A question about "proxy_redirect"
igor at sysoev.ru
Tue Jul 19 06:10:41 UTC 2011
On Tue, Jul 19, 2011 at 01:35:17AM -0400, speedfirst wrote:
> If the backend server uses FULL URL to initiate a redirect, like
> Can proxy_redirect match this URL and do the redirect?
> I write this in config but it seems doesn't work:
> proxy_redirect http://10.1.2.3.4:1234/redirect
> but nginx still return "Location: http://10.1.2.3.4:1234/redirect" to
> My questions are:
> 1. Does proxy_redirect only work in the case of relative URI
> 2. How should I do if I want to convert the backend server's host in the
> FULL URL redirection case?
nginx uses prefix for redirect. For example, if backend sends
and nginx has directive
proxy_redirect http://10.1.2.3.4:1234/redirect /r;
So nginx will rewrite it as
More information about the nginx