server {
listen 80
server_name xxx.com
...
...
location /yyy {
root /home/projects;
index index.html index.htm;
}
...
...
}
rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
server {
listen 80
server_name xxx.com
...
...
location /yyy {
root /home/projects;
if ( -d $request_filename ){
rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
}
index index.html index.htm;
}
...
...
}
欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) | Powered by Discuz! X2.5 |