问题:
访问:http://127.0.0.1/xxxyyyzzz.php
自动跳转:http://127.0.0.1/xxxyyyzzz.php/index/login
结果:404 Not Found
解决:在伪静态设置里增加如下配置
location ~* (runtime|application)/ { return 403; }
location ^~ /xxxyyyzzz.php/ {
if (!-e $request_filename) {
rewrite ^/xxxyyyzzz\.php(.*)$ /xxxyyyzzz.php?s=$1 last;
break;
}
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}