[solved] mod_rewrite for pretty urls overwrites my ErrorDocument 404

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
MarkFresh

[solved] mod_rewrite for pretty urls overwrites my ErrorDocument 404

Post 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
Last edited by MarkFresh on Fri May 16, 2008 2:01 pm, edited 1 time in total.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: mod_rewrite for pretty urls overwrites my ErrorDocument 404

Post by Ziggywigged »

Use the "Enable Custom 404 Message" option under Site Admin > Global Settings. Hope that helps.
Take a penny, leave a penny.
MarkFresh

Re: mod_rewrite for pretty urls overwrites my ErrorDocument 404

Post by MarkFresh »

thanks that does work
Locked

Return to “CMSMS Core”