/location and or IF statment

Joshua Zhu zhuzhaoyuan at gmail.com
Thu Jul 23 11:41:58 MSD 2009

1) Use multiple server blocks, as what Michael suggested.
2) Use variables, e.g.:
        location ~* (a|b) {
            set $var $1;
            rewrite ^ /test$var.html break;
   Please see http://wiki.nginx.org/NginxHttpRewriteModule for more
information :)

On Thu, Jul 23, 2009 at 9:55 AM, vburshteyn<nginx-forum at nginx.us> wrote:
> so in that case one more stupid question (sorry i am windows tech who is making the switch)
> so if i have a statment like
> location ~* (a|b) the search will terminate as soon as it finds either a or b.  how can i set it up to say ( a and b)?
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4346,4353#msg-4353

Joshua Zhu

More information about the nginx mailing list