Page 1 of 1

Re: Custom 404 only works for .html pages

Posted: Tue Apr 11, 2006 2:51 am
by kermit
in .htaccess:

ErrorDocument 404 /error.html

provided that:
/error.html doesn't exist
you don't have a page using 'error' as its alias (if you did, that'd be what gets served instead)
you're using the cmsms .htaccess that rewrites to .html

note that this will cause *all* 404's to run through cmsms, which could load the server down if it's a busy site and there are missing files (or those blasted worms and hackers hit you hard looking for vulnerable code).

you might be better off creating a static custom 404 page and using it instead.

Re: Custom 404 only works for .html pages

Posted: Wed Apr 12, 2006 7:02 am
by kermit
you can always make a static one that "looks" like it was generated by the cms. just browse to a relatively clean page on the site, save the source, and a few edits should be all it takes. you could even make it a php file & link to the existing db-based css if you want; not quite static but it's a lighter load on the server than doing a whole page.