先说结论,试试这个伪静态!

if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
    rewrite (.*) /index.php;
}

测试环境:Windows Server 2012 R2 宝塔7.5.0 Nginx1.21.1 PHP7.3/7.4

标签: none

添加新评论