小伙伴遇到使用tp3+在nginx服务器上跑,除了index.php,别的全挂的问题。解决这个问题只需要配置nginx的配置文件,让他支持pathinfo即可
location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
在nginx的配置文件中,添加上述代码即可
建议给每个网站配置虚拟主机。这样一个网站不会影响另外的网站