klose 发表于 2016-11-29 12:29:17

typecho 404页面不生效,是Nginx的默认页面

            环境:Nginx 1.x PHP7.0

klose 发表于 2016-11-29 12:30:21

location / {
index index.html index.php;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php) {
rewrite (.*) $1/index.php;
}
if (!-f $request_filename) {
rewrite (.*) /index.php;
}
}伪静态如上

KUBEST 发表于 2016-11-29 16:46:04

此规则同样适用于WP吗?

siseboy 发表于 2016-11-29 16:51:16

网站配置文件那里删掉         error_page 404 /404.html;

KUBEST 发表于 2016-11-30 18:45:33

siseboy 发表于 2016-11-29 16:51
网站配置文件那里删掉         error_page 404 /404.html;

谢谢,这个管用~~~
不过是啥原因呢
页: [1]
查看完整版本: typecho 404页面不生效,是Nginx的默认页面