Nginx访问二级目录后/(反斜杠)无法访问问题的解决办法
Nginx访问二级目录的时候不加/(反斜杠)无法访问,现在给出解决办法。
我用的是正则表达式自动加/(反斜杠)。
if (-d $request_filename){
rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}
发布时间: 2012-08-09 15:59:21 作者: rapoo
Nginx访问二级目录后/(反斜杠)无法访问问题的解决办法
Nginx访问二级目录的时候不加/(反斜杠)无法访问,现在给出解决办法。
我用的是正则表达式自动加/(反斜杠)。
if (-d $request_filename){
rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
}