配置
location / {
root /d/;
index index.html index.htm;
}
访问 http://www.a.com/b/c 我想让 www.a.com/b/ www.a.com/b/c 都是请求 /d/目录,但是现在总是请求 /d/b/ 和 /d/b/c/目录
配置
location / {
root /d/;
index index.html index.htm;
}
访问 http://www.a.com/b/c 我想让 www.a.com/b/ www.a.com/b/c 都是请求 /d/目录,但是现在总是请求 /d/b/ 和 /d/b/c/目录
1
0ZXYDDu796nVCFxq Apr 24, 2019 location /b/c/ {
alias /d/; break; index index.html index.htm; } location /b/ { alias /d/; break; index index.html index.htm; } |
2
imkuang Apr 24, 2019 via Android
使用 alias 解决啊
|
4
ethsol Apr 24, 2019
location 这里用正则匹配
|