nethnet Posted December 9, 2009 Share Posted December 9, 2009 Basically, pretty much every error encountered on my web server is a 403 - Forbidden error, even when the file does not exist and 404 - Not Found should be returned. It's crucial that the correct error code is returned, so that our automated debugging schema can notify us properly on the error. We don't want to be told 1,000 times a day that people are having trouble accessing a forbidden file when it doesn't even exist in the first place. The false errors started to be encountered after a .htaccess update involving a new mod_rewrite schematic. I'll post the entire relevant portion of the .htaccess file that was altered so that perhaps the source of the error can be found. Is there something wrong with the mod_rewrite that is causing a Forbidden error instead of Not Found? IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> ** lines edited to omit sensitive material** Options -Multiviews Options +FollowSymLinks RewriteEngine On RewriteRule ^home$ index.php [L] RewriteRule ^login$ register RewriteRule ^game/([0-9]+)/?$ game.php?id=$1 [L] RewriteRule ^error/([0-9]{3})/?$ error.php?code=$1 [L] RewriteRule ^user/([A-Za-z0-9]{4,14})/?$ user.php?name=$1 [L] RewriteRule ^stats/?$ /stats/index.php [L] RewriteRule ^([A-Za-z0-9]+)/?$ $1.php [L] ErrorDocument 404 /error/404 ErrorDocument 500 /error/500 ErrorDocument 403 /error/403 Is there something obvious that I'm missing here? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.