location / {
if(-f $request_filename/index.php) {
rewrite (.*) $1/index.php break;
}
if(!-f $request_filename) {
rewrite /(.*) /index.php?rewrite=$1 break;
官方给的这个,经测试,伪静态后404错误
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?rewrite
返回上一页 返回【求助】