Welcome! Log In Create A New Profile

Advanced

Re: rewrite save original url

Arthur Blake
September 21, 2010 08:38PM
Thank you Maxim and tqvn2004! I placed the following in my location
directive:

proxy_set_header X-Rewrite-URL $request_uri;

And it worked!

On Tue, Sep 21, 2010 at 4:21 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Tue, Sep 21, 2010 at 03:21:31PM -0400, Arthur Blake wrote:
>
> > When rewriting a url with the rewrite directive, is it possible to save
> the
> > original url in a request header for the downstream handler?
> >
> > Similar to the X-Rewrite-URL header built in to ISAPI rewrite.
> > Or in Apache, I can do it with something like:
> >
> > #== Capture original uri and query string into environment variable so it
> > can be put in a header
> > #== Match non-empty query string
> > RewriteCond %{QUERY_STRING} (^.+$)
> > RewriteRule (.*) $1 [E=x-rewrite-url:$1?%1]
> >
> > If this is possible in nginx, how would I do it?
>
> http://wiki.nginx.org/NginxHttpCoreModule#.24request_uri
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite save original url

Arthur Blake September 21, 2010 03:26PM

Re: rewrite save original url

tqvn2004 September 21, 2010 04:13PM

Re: rewrite save original url

Maxim Dounin September 21, 2010 04:28PM

Re: rewrite save original url

Arthur Blake September 21, 2010 08:38PM

Re: rewrite save original url

pandy October 13, 2010 01:29PM

Re: rewrite save original url

pandy October 13, 2010 02:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready