location / {
try_files $uri $uri/ =404;
#proxy_pass http://bergerwd;
#proxy_set_header Host $host;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last; break;
}
}
一开始配置太坑了,响应是404,然后access.log那也没有具体错误,大概知道是index.php的重写规则没整
location / {
try_files $uri $uri/ =404;
#proxy_pass http://bergerwd;
#proxy_set_header Host $host;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last; break;
}
}
一开始配置太坑了,响应是404,然后access.log那也没有具体错误,大概知道是index.php的重写规则没整
本文标题:nginx配置rewirte
本文链接:https://www.haomeiwen.com/subject/gxmyactx.html
网友评论