nginx配置php pathinfo

现在php.ini里开启pathinfo

在nginx配置文件里添加

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

添加到server 模块里。

猜你喜欢

转载自blog.csdn.net/helloworld_dream/article/details/81218355