简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM