off-domain redirect using X-Accel-Redirect

dbanks nginx-forum at nginx.us
Thu Apr 14 09:36:56 MSD 2011


Hello,

I'd like for my application to send a 302 redirect (or equivalent) to an
off-domain location (not my server).  X-Accel-Redirect appears to be the
best way to achieve this, but I don't see any reference to the URI being
a reference to a different server.

Is something like the following allowed?

X-Accel-Redirect: http://www.google.com;
or
X-Accel-Redirect: http://img.pics.com/mypic.gif;

I get a 404 from nginx when attempting this.  I do not have any
X-specific header directives (block or pass) in my configuration.

To be clear, I don't mind debugging it myself, I just want to verify
that this is possible before I spend too much time on it.

Cheers,

Dean

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,191163,191163#msg-191163




More information about the nginx mailing list