Hot answers tagged

6

Create an .htaccess file in the directory you wish to block, or your root HTML directory if you want this to affect your entire website. Place this code inside: # Block includes if they have a .inc.php extension. Change # that to match whatever extension you use for your includes. <Files *.inc.php> Order Deny,Allow Deny from All </Files> # ...


6

When I try to get a particular image on a remote domain via JavaScript I get a 403 error. Likely answer: The site in question has protection against "leeching" / hotlinking. i.e. It checks to see what host is requesting the file before serving it. If the request comes from an unrecognised website, they throw a 403 Forbidden error. If you take a look ...


5

Once Google Webmaster Tools reports 404 errors on your website, you have to fix the issue on the site, then you need to mark these errors as fixed in Google Webmaster Tools. Then if this error appears again on your site, Google Webmaster Tools will report it again, otherwise it's fixed.


4

It could be generated by a proxy server between the client and your server. Check the error message.


4

This is probably a silly question, but did you restart your web server process after modifying httpd.conf? Sometimes I forget to do that...


4

how this workaround indeed works PHP runs later in the request, so most of the time you can simply override any headers that Apache has already set in your PHP code. That's pretty much it. (Aside: Sending 403s through your 404 handler in this way obviously makes it harder to trigger a real 403 from your Apache config/.htaccess, if you should need to.) ...


3

Folder and File Permissions and Ownership It sounds like you are having ownership problems rather than file permissions. Doing a chmod 0755 will do the following: Owner: Write - Read - Execute Group: Read - Execute Public: Read - Execute Which should allow users to read the directory however it doesn't necessary mean that files can be read or written to ...


3

Timing can be an issue. In the time that you tested the URL's that turned up with error 403, they referenced files on the server with bad permissions. Make sure that the world has at least read and execute permissions to the file. In linux, you can use chmod 755 (path/to/file with issue) The fetch time must have happened AFTER setting the correct ...


3

My interpretation of that header is that the HTTP specification was not followed properly and a required field is missing or bad data is provided. For example a header is missing or invalid characters are used in the request, etc. Some malformed request exam-ple: GET /images/logo.png HTTP/2 # there is no HTTP 2 POTT /images/logo.png HTTP/1.1 # POTT should ...


3

It's probably because Xenu is trying to pull up the page to verify the link is valid but Wikipedia is blocking it because it is an unauthorized bot. They probably are blocking a long list of crawlers and bots that are not related to search engines (i.e. link checkers, spammers, scrapers, etc).


3

I've been able to reset a lot of my site's values using appcmd, but I had to dig into specific configurations I wanted to change, which I'll describe a bit below. I know for sure that this works with IIS 7, but I'm not 100% certain whether it passed on to 7.5 so YMMV. appcmd isn't in my cmd path on any of my installations (though these machines are 2k8sp2) ...


3

Found the error: Some silly module (don´t know which one yet), added this code into my .htaccess file: <Limit GET POST> order deny,allow allow from 24.232.0.0/16 allow from 66.60.0.0/18 allow from 129.214.0.0/16 allow from 140.191.0.0/16 allow from 157.92.0.0/16 allow from 161.190.0.0/16 allow from 163.10.0.0/16 allow from 167.252.0.0/16 [...] allow ...


2

I just looked at your page source, and (example) image: http://x3.keefermadness.com/lib/img/home/home-about.jpg loads perfectly fine by visiting that URL. Do you have a setting enabled for "disallow hotlinking" of images somewhere? It is possible that that could be causing the problem.


2

They get removed from the index. There is no official documentation from Google on this, but you can find plenty of cases where websites have been returning 403 by mistake and got deindexed. Example case : http://wordpress.org/support/topic/403-crawl-error-on-google-all-pages-have-been-removed-from-google-index


2

As you know Google will eventually remove pages which return server codes 404 Not Found and 410 Gone, however a 403 is a forbidden response from the server not an error. Google will most likely continue checking the page and keep it in it's index in the event it becomes accessible. If you would like it to not be indexed set the meta noindex header tag


2

Ouch, please avoid chmod 777, it's like having your door open with the key in the lock. Error 13 is related to permission errors. In Linux, a folder needs a execute-bit to allow descending in it. So, make sure the permissions on /media/data and /media/data/jm is set to 755 OR 700 if the user running apache is the owner of the folders. root is the god in ...


2

403 Means that the end user does not have permission to view that file. Make sure your FTP client uploads the files with the correct permissions. Files: 0644 Directories: 0755


2

There is no way to forward the www > cdn without reaching the request on the main server since well they are linking to you. My advice is not to 301 redirect but rather than just flat out 404, hopefully by doing so they will stop hot linking you. While this has some traffic on your server it shouldn't be too much and you should consider upgrading your ...


2

The site appears to be checking the referrer field. curl -I http://mysticstars.net/gifs/star_bul.gif -e "*" HTTP/1.1 403 Forbidden Date: Wed, 25 Jun 2014 15:45:40 GMT Server: Apache/2.2.27 Accept-Ranges: bytes Vary: Accept-Encoding Content-Length: 1007 Content-Type: text/html curl -I http://mysticstars.net/gifs/star_bul.gif -e "http://mysticstars.net" ...


2

You want to use the ErrorDocument rule. Using your example, it might look something like this: <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> ErrorDocument 403 index.php


2

A few things: I am assuming that dom.ain is for our sake like example.com would be. I like it! Check the directory permissions for the DocumentRoot /var/www/html/git/project/app. It should be owned for the user that controls it in Apache. It depends on how your Apache is set-up but the user could be www-data or root. If you are using virtual hosting and a ...


2

If you have the mod_rewrite module installed, then you can put this in your .htaccess file in the root folder of your website (which usually is the public_html folder): RewriteEngine On RewriteRule ^\?utm_source\=dlvr.it\&utm_medium\=twitter$ - [R=403,NC,L] You might have to remove the \ from the =, I can't remember if equals needs escaping. Another ...


2

mickburkejnr is close, but not entirely right. The problem is not with DNS (it could be, but that's unlikely). The problem is that your web server isn't configured to respond to queries for your site without the "www" prefix with the appropriate site. Keep in mind that "www" is just a normal subdomain. "google.com" is the root site, "www.google.com" is a ...


2

Try this if you have rewrite module installed: RewriteEngine On RewriteCond %{REQUEST_URI} ^(.*)wp-login.php$ RewriteCond %{REMOTE_ADDR} !^xxx\.xxx\.xxx\.xxx$ RewriteRule ^(.*)$ - [R=403,L] replace the xxx's with each octet of your IP address. For example, if your IP address is 111.222.333.444, then replace RewriteCond %{REMOTE_ADDR} ...


1

In theory: A web server may return a 403 Forbidden HTTP status code in response to a request from a client for a web page or resource to indicate that the server can be reached and understood the request, but refuses to take any further action. Status code 403 responses are the result of the web server being configured to deny access, for some reason, to the ...


1

Looks like a no brainer, folder ownership! Try doing the following: sudo chown -R www-data:www-data /webroot


1

Perfectly explained in this URL: https://web.archive.org/web/20131026070133/http://danielirvine.com/blog/2011/07/18/understanding-403-forbidden/ There’s a problem with 401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, ...


1

?utm_source=dlvr.it&utm_medium=twitter utm_source and utm_medium are used by Google Analytics (and possibly other trackers) to monitor campaigns, so blocking access purely on this query string does not "feel right", however, if this is correct in your situation then ok... An important point to realise with query strings is that they cannot be ...


1

Check the actual file you're running the query strings against to see if it is producing the 403 errors. If you create a PHP file that has the following contents and save it and then run it live on the server while using an actual dot in the query string, then you'll get the 403 error. <?php if (strpos($_SERVER['QUERY_STRING'],".") !== false){ ...


1

You will need to modify your read-write access permissions I am guessing. Log into the server, get the file in question >click click > edit permissions > chmod 644 would probably be the way to go.



Only top voted, non community-wiki answers of a minimum length are eligible