Proxy pass and query string question

Ankur Gupta ankur655 at gmail.com
Sun Jul 19 00:34:43 MSD 2009


Hi,

1.  Is it possible to have proxy_pass be applicable to query_string variable
without using the location directive?  I was not able to make this work in
the configuration file.

  Specifically:

    if ($query_string ~* "a=1") {
           proxy_pass http://proxy1;
    }

   doesn't work unless its within a location directive

2.  If the location directive is necessary then how do I make it get past
the location directive if query string doesn't match?

  eg:

 location ~ /foo    {
    if ($query_string ~* "a=1") {
           proxy_pass http://proxy1;
    }
 }
    If query string doesn't match I want to go further and check against
other location directives etc. How can that be done?


Thanks,
Ankur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090718/0ba83fe5/attachment.html>


More information about the nginx mailing list