在服务器中之前使用http协议下,ThinkPHP框架的项目都能正常访问,但是换了https协议后,就出现无法虚拟化路径,即无法去除index.php文件,找到问题即解决方法:
修改nginx中的location配置项
location ~ ^/.*$ {
#if (!-e $request_filename) {
# rewrite ^/(.*)$ /index.php/$1;
#}
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?s=$1 last;
}
}