<HTML><BODY>nginx doesn't have a rich programming language :). if - it is only a new localtion :).<br><br>see this example:<br><br><a href="http://markmail.org/message/yv6x3z66x3a5jdv2"></a><a href="http://markmail.org/message/yv6x3z66x3a5jdv2"><a href="http://markmail.org/message/yv6x3z66x3a5jdv2">http://markmail.org/message/yv6x3z66x3a5jdv2</a></a><br><br>&nbsp;<br>Thu, 7 Apr 2011 19:33:25 -0300 письмо от Jonathan Leibiusky &lt;ionathan@gmail.com&gt;:<br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote"><div id="class_1302219240">hi! first I wanted to say that nginx is a great product!<br>I am trying to use it to route my traffic with several different rules. This way I can do ab testing.<br>My rules use different inputs, like http headers and uri of the request.<br>
I am using right now the location block with regex. But when I need to do something more complex (like matching the query string and http_method) I can't find a way to do it as it seems like nginx doesn't have a rich programming language, which is reasonable. But I am sure there are ways to do what I want, like:<br>
<br>location ~ /items.* {<br>&nbsp; if ($query_string ~ .*&amp;ids=.* &amp;&amp; $request_method = GET) {<br>&nbsp;&nbsp;&nbsp; proxy_pass pool_a;<br>&nbsp; }<br>&nbsp; proxy_pass pool_b;<br>}<br><br>this is just an example, my rules can get more complex. what would be the recommended way to address this?<br>
<br>thanks!<br><br>jonathan<br>

_______________________________________________<br>
nginx mailing list<br>
<a href="sentmsg?compose&amp;To=nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank"></a><a href="http://nginx.org/mailman/listinfo/nginx"></a><a href="http://nginx.org/mailman/listinfo/nginx"></a><a href="http://nginx.org/mailman/listinfo/nginx"></a><a href="http://nginx.org/mailman/listinfo/nginx"></a><a href="http://nginx.org/mailman/listinfo/nginx"></a><a href="http://nginx.org/mailman/listinfo/nginx"><a href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a></a><br>
<br>
</div></blockquote><br></BODY></HTML>