直接在對應的vhosts.conf配置文件的location / {}中添加如下內容:php
location / { index index.html index.htm index.php; #autoindex on; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; }
具體操做過程以下:html