Welcome! Log In Create A New Profile

Advanced

Location regex

Mathew Davies
October 27, 2009 08:30PM
Hi.

I am having trouble with a location regular expression.

location ~* ^/(library|conf|appg) {
> return 403;
> }
>

It is my understanding the following regular expression should match any uri
starting with library, conf or appg. However, this is not the case.

For instance.

http://domain.com/appg/
>

will match fine where as

http://domain.com/appg/.file
>

wont match (causing the file to be downloaded)

Am I doing something inherently wrong or is this a bug in Nginx?

-Mathew
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: 93
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