通过nginx 访问thinkphp

修改 nginx的配置文件:

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

原文地址:https://www.cnblogs.com/lixiuyuan999/p/6379497.html