[英]Nginx Configuration for Redirecting URL
I want to redirect something like this /atpf/xyz -> /atp/xyz, I have a configuration like this, but doesn't seem to work 我想重定向这样的东西/ atpf / xyz-> / atp / xyz,我有这样的配置,但似乎不起作用
location /atpfe {
rewrite ^/atp/(.*)$ /$1 break;
proxy_pass http://backend-atp;
}
Can someone suggest? 有人可以建议吗?
I changed it to this and worked: 我将其更改为此并工作:
location /atpfe {
rewrite ^/atpfe/(.*)$ /atp/$1 break;
proxy_pass http://backend-atppub;
}
Wasn't fully aware of the rewrite functionality 没有完全意识到重写功能
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.