Redirecting without canonicalizing the port

Yang Zhang yanghatespam at
Fri Dec 17 02:58:16 MSK 2010

Can I redirect to a URL that uses the port number in the request, as
opposed to the port specified in `listen`? (so as to work with

E.g., if I have `listen 444` and have a tunnel so that my client is
surfing http://localhost:4444, I don't want my redirects to send the
client to http://localhost:444, which is currently the case - I want
the port number to be reflected back, not "canonicalized."

Thanks in advance for any hints.

More information about the nginx mailing list