在nginx配置文件中加
location / { //如果是资源文件,则不走phpinfo模式 if (!-e $request_filename){ ewrite ^/(.*)$ /index.php?s=$1 last; } }