Welcome! Log In Create A New Profile

Advanced

Re: Location regex

Michal Kowalski
October 27, 2009 11:02PM
On Wed, Oct 28, 2009 at 2:37 AM, Mathew Davies
<thepixeldeveloper@googlemail.com> wrote:
>> A more efficient way of doing this is :
>
> I do not see why. I am specifying "return 403" 3 times vs once. I was it
> doing it this way before and did not think it was so efficient.
>
> Here is my full config
>
>> # Protect certain directories.
>> location ~* ^/(library|conf|appg) {
>> return 403;
>> }
>>

try

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

if you are on linux "man 7 regex" should be a good starting reading
before you goo off goggling.

mk
--
(let* ((mk "MichaƂ Kowalski") (sig `(lambda () ,mk))) ((eval sig)))
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: 243
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready