Page 1 of 1
404 instead of Smarty error
Posted: Sat Oct 15, 2005 3:23 pm
by thejimp
I'm using mod_rewrite to clean up my URLs. Does anyone have a method to get bad page requests to go to a 404 instead of this:
Warning: Smarty error: unable to read resource: "db:PAGETHATDOESN'TEXIST" in /YOURCMSROOT/lib/smarty/Smarty.class.php on line 1088
thanks,
jimp
Re: 404 instead of Smarty error
Posted: Sat Oct 15, 2005 3:35 pm
by Ted
Strange, you should be getting a fake 404 error when that happens, unless debug is turned on in config.php.
Try setting a custom 404 page in your Global Settings and see if that helps.
Re: 404 instead of Smarty error
Posted: Mon Oct 17, 2005 7:10 pm
by thejimp
Since I'm translating ###.html requests into index.php?page=###, all page requests are going through the CMS. I can enable the CMS error page, but I'd like to do a true 404 if the file doesn't exist. Can I send a 404 in the header for that particular Smarty error?
thanks,
jimp
Re: 404 instead of Smarty error
Posted: Wed Oct 19, 2005 11:03 pm
by wiseleo
Yep I got same issue.
On my 404 page I use the {sitemap} tag. 0.11-b3 btw.
Sounds like the included htaccess.txt needs to be modified to specify a custom error doc at that point and to point to a custom error page, such as 404.html