配置片段
error_page 404 /404.html;
location = /404.html {
root html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
把404.html,50x.html放到html下,
页面内引用的静态资源,建议采用/开头(静态资源也放到html下)
404页面内容太少,IE下无效的解决办法
web.xml配置404,500自定义错误页面无效的解决办法
http://happyqing.iteye.com/blog/2196958
本文介绍了如何在Nginx中配置404和50x等错误页面,并提供了具体的配置示例。同时,还讨论了解决404页面内容过少及在IE浏览器下无效的问题。
1538

被折叠的 条评论
为什么被折叠?



