vhost文件里加上下边代码。

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

更多推荐

nginx服务器 在域名隐藏/去掉index.php(网站伪静态)