Welcome! Log In Create A New Profile

Advanced

Re: location regex

November 01, 2016 10:06AM
On 01 Nov 2016, at 16:44, olat <nginx-forum@forum.nginx.org> wrote:

> Hello,
>
> I would like to ask about regex. Why these 2 doesn't behave the same?
>
> location ~ /(apple/|pear/(small|big)/|test(ing|er)/(fruit|vegis)_)*
>
> location ~ /apple/*|/pear/(small|big)/*|/test(ing|er)/(fruit|vegis)_*
>
>
> could you point me to good practice?

The good practice is not to use regex at all.

location /apple/ {
}

locaiton /pear/ {
}

etc.


--
Igor Sysoev
http://nginx.com

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

Location regex

Mathew Davies October 27, 2009 08:30PM

Re: Location regex

Marcus Clyne October 27, 2009 09:00PM

Re: Location regex

Mathew Davies October 27, 2009 09:44PM

Re: Location regex

Marcus Clyne October 27, 2009 11:02PM

Re: Location regex

Michal Kowalski October 27, 2009 11:02PM

Re: Location regex

Igor Sysoev October 28, 2009 03:34AM

Re: Location regex

Mathew Davies October 28, 2009 10:56AM

Re: location regex

Igor Sysoev November 01, 2016 10:06AM

Re: location regex

olat November 01, 2016 06:49PM

Re: location regex

Igor Sysoev November 02, 2016 07:30AM

Re: location regex

Francis Daly November 03, 2016 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 48
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready