当我尝试在 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
我尝试了两个路径,但给出了相同的错误,我检查并确保该文件存在于路径中。那为什么会出现这个错误呢?
最佳答案
缺少模板处理程序
输入字段要求相对路径。
Specify the relative path to the template to execute when ColdFusion cannot find a requested template.
在您的情况下,C:\ColdFusion2016\cfusion\wwwroot\ErrorPages\404.cfm
是绝对路径,它不会起作用。
输入:/ErrorPages/404.cfm
,这个应该可以。
关于coldfusion - CF admin 中的自定义缺失模板处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49002483/