Custom 404 only works for .html pages

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.
Post Reply
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Custom 404 only works for .html pages

Post 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.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Custom 404 only works for .html pages

Post 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.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “CMSMS Core”