redirect - how to preserve sub-domain and base path in the proxy_redirect final url in Nginx -
basically have problem in setting proxy_redirect in nginx. want perform proxy redirect this:
http://subdomain.domain.com/test1/test2/test3 -> http://subdomain.another.com/test1/test2/test3
here subdomain , url path (i.e. /test1/test2/test3) keeps on changing, here have grab them redirect url , pass final url.
i trying this:
proxy_redirect ~^(http://[^\.]+)\.domain\.com/(.+)$ http://$1.another.com/$2;
please provide solution this.
redirect nginx reverse-proxy
No comments:
Post a Comment