CF管理员中的自定义缺失模板处理程序

时间:2018-02-27 06:30:00

标签: coldfusion coldfusion-2016

当我尝试在CF管理员设置中将我的自定义错误页面指定为缺失模板处理程序时,它会给我以下错误。

The file specified as the site wide missing template handler does not exist. The default missing template handler will be used until a replacement is created.

这是我文件的操作系统路径

C:\ColdFusion2016\cfusion\wwwroot\ErrorPages\404.cfm

这是我的网络路径

http://localhost:8500/ErrorPages/404.cfm

我尝试了两个路径,但是给出了相同的错误,我检查并确保文件存在于路径中。那么为什么会出现这个错误?

1 个答案:

答案 0 :(得分:2)

Missing Template Handler输入字段 要求提供相对路径

  

指定ColdFusion时要执行的模板的相对路径   找不到要求的模板。

在您的情况下,C:\ColdFusion2016\cfusion\wwwroot\ErrorPages\404.cfm是一个绝对路径,它将无效。

输入:/ErrorPages/404.cfm,这个应该有效。

相关问题