how to handle 404 or page not found error in coldfusion?

1.7k views Asked by At

in coldfusion how to handle 404 error or page not found error, what will be the code to show custom error message in case any requested page is not found.


Thanks,
Yugal

1

There are 1 answers

1
Dan Short On BEST ANSWER

You have a few options:

  1. In IIS or Apache, change the default 404 error handler to point to a cfm file of your choice.

  2. In Application.cfc, set up the onMissingTemplate function to handle requests for .cfm files that are sent to ColdFusion before the web server checks to see if they actually exist.

Dan