我的thinkphp放在localhost下的thinkphp站点下
在虚拟机vhosts.conf中
location /thinkphp/ {
if (!-e $request_filename){
rewrite ^/thinkphp/(.*)$ /thinkphp/index.php?s=/$1 last; #rewrite模式
#rewrite ^/thinkphp/(.*)$ /thinkphp/index.php/$1 last; #pathinfo模式 任选其一
}
}
在thinkphp config中添加
'URL_MODEL' => 2,