rewrite save original url

tqvn2004 nginx-forum at nginx.us
Wed Sep 22 00:13:16 MSD 2010


I think you could do something like this:

[code]
# save old uri + arguments:
set $original_uri $uri$is_args$args;
# perform rewrite:
rewrite ^(.*)$ /new_uri/index.php;

# later on, in location defined downstream handler, add:
proxy_set_header X-Rewrite-URL $original_uri;
[/code]

Never try it out, but hope it helps!

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




More information about the nginx mailing list