Internal Server Error Instead Of 404
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Server Error instead of: 404 - Not Found up vote 1 down vote favorite Apparently these lines in my .htaccess cause the server to output a 500 instead of a 404 error which should appear when trying to access a non-existant site. RewriteEngine On # Don't rewrite requests to /de or other real files RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^.*/(css|scripts) # Rewrite incoming requests to their equivalent behind /de RewriteRule ^(.*)$ de/$1 [L,QSA] Alas I'm very unfamiliar with .htaccess. Where's the mistake in this one which causes the 500 instead of the 404 error? This is the error in the logfile: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. Edit: RewriteRule ^(.*)$ de/$1 [L,QSA] This part is responsible for the error. Why does it prevent the 404-error page though? .htaccess redirect http-status-code-404 share|improve this question edited Nov 18 '15 at 14:49 pnuts 33.9k63769 asked Mar 21 '12 at 17:07 BlueHorizon 67212 1 Seems that you've produced an infinite rewrite loop or something similar. –Uwe Keim Mar 21 '12 at 17:09 Yes, that seems to be the case. That error should be caused by the .htaccess above because without it, the error does not occur. But how to fix thix? –BlueHorizon Mar 21 '12 at 17:13 1 I'm no mod_rewrite expert at all; I would try reading the documentation and comment out all lines then start commenting in line by line until it breaks. To quote: "The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail." –Uwe Keim Mar 21 '12 at 17:18 I edited the problematic section into the starting post. I hope someone can help me fixing it. –BlueHorizon Mar 21 '12 at 17:31 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote This part is responsible for the error. Why does it prevent the 404-error page tho
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Server Error instead of 404 http://stackoverflow.com/questions/9809464/500-internal-server-error-instead-of-404-not-found Page Not Found up vote 0 down vote favorite Any idea why I get internal server errors instead of 404 errors? ErrorDocument 404 /404.html That's whats in my .htaccess file, so I really don't know why it does that... :/ Also note, this is on a subdomain... On the main domain it works fine, but on subdomains the htaccess file never works... apache .htaccess http-status-code-404 share|improve http://stackoverflow.com/questions/12540890/500-internal-server-error-instead-of-404-page-not-found this question edited Sep 22 '12 at 16:29 Kev 82.9k36226317 asked Sep 22 '12 at 5:08 Jonny 1619 Do you have other .htaccess directives to prettify urls or otherwise change your routing scheme? –Andrew Gorcester Sep 22 '12 at 5:12 What happens when you point your browser to example.com/404.shtml –stark Sep 22 '12 at 5:12 stark: If I point my browser to the 404 file it works fine. Andrew: I don't have anything else in my htaccess file, thats the only line in it right now. –Jonny Sep 22 '12 at 5:28 Type some random url and see what it throws? –Starx Sep 22 '12 at 5:29 2 what does the apache error log contain? –Tim G Sep 22 '12 at 5:31 | show 3 more comments 1 Answer 1 active oldest votes up vote 0 down vote Is the file 404.html exists? In some servers you could find something like "404 file not found ... Additionally, the 404 page was not found". If it is a subdomain, maybe the file 404.html does not exist as well, or the server could not find it because of configuration mistakes.
7 years, 5 months ago I am using WordPress MU 2.7.1 and BuddyPress 1.0 and all over my error log is: Request exceeded the limit of 10 internal redirects due to probable configuration https://buddypress.org/support/topic/404-errors-turning-into-500-errors-through-internal-redirects/ error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. So i traced the error to my access log and I found that these errors are being caused by some site requesting a file that no longer exists. Which should create 404 (not found) error, but instead it is redirecting the site to look somewhere else and then that place internal server is telling it to look in the first place, causing an internal redirect which only stops once it reaches the maximum of 10 internal redirects. At this point it puts out a 500 internal error and when there are enough of them tends to hang my PHP and give me whitescreens on any page that isn't cached. Only rebooting php and my server solves the internal server error problem until google or someone else searches for a file on my site that isn't there, and brings my site to a screeching halt, usually about once or twice a day. GET /wp-content/mu-plugins/bp-core/images/mystery-man.jpg HTTP/1.1" 500 612 "-" "Googlebot-Image/1.0 (BuddyPress moved from mu-plugins into plugins) I have been told to check my .htaccess file, but I don't see anything wrong with it:
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
SecFilterEngine Off
SecFilterScanPOST Off
# BEGIN WPSuperCache
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUE