Copy link to clipboard
Copied
I'm having problems with a custom 404 page. CF8
I have create a page 404.cfm that I want users to see if they get a 404 error.
I changed the custom 404 page in the CF admin and this custom page works well when the page is an htm page.
But does not work when the page is a cfm page.
of course all of my pages are cfm pages.
How do I make sure my users get the 404.cfm page when there is a 404 error but
any kind of error ...like bad cfml, etc......?
Do I need to add something to the application .cfc??
Copy link to clipboard
Copied
You should look into the onMissingTemplate function of Application.cfc.
Adobe's documentation is here: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d2a.html
Copy link to clipboard
Copied
You might also consider configuring your 404 error handler at the web server level rather than in ColdFusion. What web server ( IIS or Apache ) and version are you using?
Copy link to clipboard
Copied
IIS and CF 8
Copy link to clipboard
Copied
Have you tried configuring your custom 404 error in IIS rather than CF?
Copy link to clipboard
Copied
Yes...my host server set this up.
I set up the CFerror in the application.cfc like this
It seems that my work on this catches all errors except 404 errors.
But I am not getting the error emails though.
Copy link to clipboard
Copied
Am I understanding you correctly? Your host setup custom 404 handling in IIS. If this is the case I suspect that the CF server never receives a request when a file is not on the server, it has already been handled by IIS. Therefore no CF logic will, such as emails, will be executed.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more