在使用nginx访问项目时会出现如下情况:
在加上index.php时访问效果如下:
由此可见是因为重写的原因,在配置文件中加入如下代码:
location / {index index.html index.htm index.php;#autoindex on;#添加部分if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; } }
重启phpstudy,再用原来的链接访问就ok了