<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.PHP?/$1 [QSA,PT,L] </IfModule>
第二步:修改Nginx.conf 的 location / { } 部分
if (!-e $request_filename){ rewrite ^/(.*)$ /index.PHP?s=/$1 last; }
原文链接:https://www.f2er.com/thinkphp/881446.html