Nginx自定义404页面,返回200状态码解决方法
nginx.conf (nginx配置文件)
http {
...
fastcgi_intercept_errors on;
...
}
default (网站配置文件)
server {
...
error_page 404 /404.html;
...
}如果还需要设置其他的按照格式添加即可 error_page xxx /xxx.html; 默认页面存放目录为网站根目录
相关推荐
csstpeixun 2020-06-28
competeking 2020-06-14
Dreamya 2020-06-09
XuDanT 2020-06-07
byourb 2020-05-14
zhangxiaocc 2020-01-30
lanzhusiyu 2019-12-30
孙雪峰 2019-08-23
高触Toucher 2018-04-16
AGGirl 2018-10-31
霸王棍 2011-05-12
麦当劳 2011-12-15
贫农 2015-11-04
industry0 2013-12-21
yanghan 2011-09-15
wawaboss 2012-04-10
tydanei 2019-07-01