【发布时间】:2015-02-02 13:47:39
【问题描述】:
我有一个自定义的 404 页面,当查询一个不存在的地址时,它会正确返回,例如“www.example.com/test/testjihi”将正确返回我的自定义 404 页面。
但是,如果使用 .html 扩展名指定不存在的地址,例如:“www.example.com/test/testjihi.html”,则会返回默认的“找不到文件”页面,而不是自定义 404 页面。
我全局配置错误页面:
server {
listen 443;
server_name localhost;
root /www;
error_page 404 /404.html; # this is my custom page
...
有什么想法吗?
为糟糕的术语道歉;p
【问题讨论】: