server {
listen 80;
server_name localhost;
root /httpd/nginx/html/xxx/public;
location / {
try_files $uri @rewrite;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location @rewrite {
set $static 0;
if ($uri ~ \.(css|js|jpg|jpeg|png|gif|ico|woff|eot|svg|css\.map|min\.map)$) {
set $static 1;
}
if ($static = 0) {
rewrite ^/(.*)$ /index.php?s=/$1;
}
}
location ~ \.php/ {
if ($request_uri ~ ^(.+\.php)(/.+?)($|\?)) { }
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param sc
fastcgi_param PATH_INFO $2;
fastcgi_param sc
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param sc
include fastcgi_params;
}
}
我访问其它模块都可以,比如http://域名/admin,但是我访问前台模块(默认的index)就报错了,如下:
/httpd/nginx/html/xxx/public/../application/index/view/Index/index.html
请问为什么会多出来 /.../的部分?
最佳答案