mod_rewrite stops missing.html from working
Posted by: Potatis
Posted on: 2009-06-10 03:23:00
Hi,
I have used the following code from the dreamhost wiki to my .htaccess file to clean up my URLs by not displaying the .php extensions in the URLs.
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /$1.php [L,QSA]
This works fine, I don't need to php extensions, it works as it should. My custom 404 page doesn't work though. I am getting a 500 Internal Server error:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@mpsmusicroom.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."
The only text in my .htaccess file, is the text I posted above.
I have tried a few different things, none of which worked, such as adding:
ErrorDocument 404 /missing.html
I really hope someone can help me, it is driving me crazy!