Angela Taylor
Angela Taylor

Reputation: 151

500 Internal Server Error instead of 404

This is my .htaccess

ErrorDocument 404 /404.html

But when i type a wrong url for example, http://127.0.0.1:8080/myweb/wrong-url.php, that doesn't go to 404.html and says 500 INTERNAL SERVER ERROR any body can explain why?

The error that is showing in my error log is

AH00124: 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.

Upvotes: 3

Views: 7437

Answers (1)

jprofitt
jprofitt

Reputation: 10964

It is likely that your 404.html page is, itself, generating another 404 because the location is not /404.html, but /myweb/404.html. Basically it tries to find the 404.html file, but can't, which generates another 404, then tries to find the 404.html file, but can't, which generates another 404 etc etc. Change your .htaccess to point the 404 to /myweb/404.html, or move the file to the root of your server.

Upvotes: 3

Related Questions