nginx.conf下server模塊的配置文件如下圖紅框部分
複製可以直接複製以下代碼
location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
index index.html index.htm index.php l.php;
autoindex off;
}