问题
When I try to access a page that is not found, Coldfusion 10 provides this error page instead of redirecting to our 404 Page Not Found page. How can I get Coldfusion to redirect to our Page Not Found page instead of providing this error message?

回答1:
At he point at which the error is thrown the web server is not actually in control of the request. It is waiting for CF to "hand back" the request as string buffer - content to serve.
That means there is an additional step in CF to handle missing templates. You can set (as Adam has said) the missing template handler in the CF admin - or if you are using an Application.cfc you can use the function onMissingTemplate() to do whatever you think is appropriate for a missing cfm page.
回答2:
Since the request was made for a .cfm page Coldfusion is expected to handle the request, since the file is not found then Coldfusion triggers the standard 404 error. You can do 1 of 2 things:
- Set up a 404 template on the Coldfusion administrator, as Mark A Kruger suggested.
- Set up the Application.cfc to handle the request by using the onMissingTemplate() function. Here is more documentation on that: http://bit.ly/17k4Ry8
NOTE: You can set up your onMissingTemplate() function to redirect to the actual 404 template, since it sounds like you already have one. This would be considered a Soft 404 to the crawlers.
Good Luck!
Thanks -Al
来源:https://stackoverflow.com/questions/18470520/coldfusion-10-file-not-found-error