tp6--nginx下pathinfo配置

可以看到默认报错了

官方手册有解释原因

但是这个规则不够全面,推荐使用下面的写法

            if (!-e $request_filename) {
                rewrite  ^/index.php(.*)$  /index.php?s=/$1  last;
                rewrite  ^(.*)$  /index.php?s=/$1  last;
                break;
            }

对了,文件路径大致在

  修改配置之后重启下nginx服务。

原文地址:https://www.cnblogs.com/chenyingying0/p/13604474.html