typecho搜索时出现404的解决办法
在nginx伪静态里,换成这个location /typecho/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /typecho/index.php$1 last;
}
}
location / {
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;
}
try_files $uri $uri/ =404;
} 用这一段也行location / {
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;
}
try_files $uri $uri/ =404;
}
页:
[1]