找不到Coldfusion 10文件错误 [英] Coldfusion 10 File Not Found Error

查看:160
本文介绍了找不到Coldfusion 10文件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试访问未找到的页面时,Coldfusion 10提供此错误页面,而不是重定向到我们的404页面未找到页面。如何让Coldfusion重定向到我们的页面找不到页面,而不是提供此错误消息?



解决方案

Web服务器实际上不控制请求。它正在等待CF将请求作为字符串缓冲区 - 要提供的内容回传。



这意味着CF中还有一个步骤来处理缺少的模板。你可以设置(像Adam所说的)CF管理器中缺少的模板处理程序 - 或者如果你使用Application.cfc,你可以使用onMissingTemplate()函数做任何你认为适合于缺失的cfm页面。 p>

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?

解决方案

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.

这篇关于找不到Coldfusion 10文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆