Welcome! Log In Create A New Profile

Advanced

Re: Compare variable got from location with set of strings

Jonathan Matthews
September 23, 2013 07:16PM
On 23 September 2013 11:03, Vil Surkin <vill.srk@gmail.com> wrote:
> Hello,
>
> I have some location in configuration like this:
> location ~ /([A-z]+_[A-z0-9]+) {
> … do something (got $1) …
> }
>
> And i need to compare this '$1' with a set of strings. How can i do this?

Use a named capture in the location line and the resulting variable
won't get clobbered like a $1 would.

HTH,
Jonathan

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Compare variable got from location with set of strings

Vil Surkin September 23, 2013 06:50AM

Re: Compare variable got from location with set of strings

Jonathan Matthews September 23, 2013 07:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready