I have a site whose .htaccess file contains:ErrorDocument 404 /errors/404.htmlErrorDocument 500 /errors/500.htmlThe 404 redirect works just fine, but when I encounter a 500 Internal Server Error, it gives the default Internal Server Error message as opposed to /errors/500.html. It also says Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.More info: I can get it to throw 500 if I type a trailing slash on a .html page that has had the .html removed by the remaining part of the htaccess file (e.g. if I try to navigate to http://example.com/test/ where test is actually test.html, then I get an internal server error):#example.com/page will display the contents of example.com/page.htmlRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}.html -fRewriteRule ^(.+)$ $1.html [L,QSA]#302 from example.com/page.html to example.com/pageRewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/RewriteRule ^(.*)\.html$ /$1 [R=302,L]
htaccess ErrorDocument 500 not working
htaccess;http code 500