rewrite query string

Igor Sysoev is at rambler-co.ru
Mon May 12 22:36:03 MSD 2008


On Mon, May 12, 2008 at 05:01:34PM +0200, Thomas Seifert wrote:

> Hi Igor,
> 
> thanks for your reply.
> >>o rewrite the query string part?
> >>    
> >
> >What does nginx with PHP - proxy or fastchi ?
> >  
> fastcgi, now even running through ngx_http_upstream for multiple 
> balanced backends - well done with that :).

In FastCGI you may change not just $args, but some your variable and
then use it in

fastcgi_param  QUERY_STRING       $your_var;

proxy requires to change exactly $args.

> >You may change $args using:
> >
> >      if ($args ~ ....) {
> >          set   $args   ...;
> >      }
> >
> >  
> and I got access to the matching parts there with $1, $2 and so on?
> Sounds like the way to go then, great. Thanks.

Yes.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list