Page 1 of 1

[solved] mod_rewrite for pretty urls overwrites my ErrorDocument 404

Posted: Fri May 16, 2008 1:34 pm
by MarkFresh
Hi

Having struggled for ages wondering why my

ErrorDocument 404 404.html

in my .htaccess file didn't work, my server support people pointed out that:

RewriteRule ^(.+)$ index.php?page=$1 [QSA]

"you are rewriting page names, so 404.html is getting re-written itself and as such you are getting the default 404 page at the fact your 404 page can not be found."

is there a way round this without having to revert to the internal pretty url mechanism?

thanks

Mark

Re: mod_rewrite for pretty urls overwrites my ErrorDocument 404

Posted: Fri May 16, 2008 1:39 pm
by Ziggywigged
Use the "Enable Custom 404 Message" option under Site Admin > Global Settings. Hope that helps.

Re: mod_rewrite for pretty urls overwrites my ErrorDocument 404

Posted: Fri May 16, 2008 1:46 pm
by MarkFresh
thanks that does work