May 06, 2014 02:39PM
> > 2) (I guess E but I'm not so sure), this can also be a pitfall
> example (how
> > complicating things can lead to unexpected behaviour)
> >
> > location /images/ {
> > location ~* \.(gif|jpg|jpeg)$ {
> > [ configuration D ]
> > }
> > }
> >
> > location ~* \.(gif|jpg|jpeg)$ {
> > [ configuration E ]
> > }


> The request processing stops on the first matching regex.

Which is ?

I guess E, but I'm not sure since the doc doesn't say if the inner regex is read before or after the next 1st level one. I understand that all first level are evaluated to see if one branch need to be explored deeper, but it's not so obvious.

Anyway, this example is more a school case, it should be avoid in real life, so answer is not so important. If I need to answer such a question then I'm probably in the wrong way.
Subject Author Posted

misunderstood regex location

dcaillibaud May 05, 2014 06:38PM

Re: misunderstood regex location

Francis Daly May 05, 2014 07:42PM

Re: misunderstood regex location

Igor Sysoev May 06, 2014 02:56AM

Re: misunderstood regex location

dcaillibaud May 06, 2014 11:03AM

Re: misunderstood regex location

B.R. May 06, 2014 01:28PM

Re: misunderstood regex location

dcaillibaud May 06, 2014 02:39PM

Re: misunderstood regex location

dcaillibaud May 06, 2014 02:53PM

Re: misunderstood regex location

B.R. May 07, 2014 09:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 124
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