Welcome! Log In Create A New Profile

Advanced

location and file extension regex

Musta Fa
December 03, 2016 07:22AM
im trying to create some regex just to match before second slash and only.
and allow all subfolders:

location ~ ^/([^/])+\.(tpl|xml)$ { return 404; }

these files are located in root folder, and i dont want them to be
downloaded,
but other files in subfolder are downloadable.

not sure why it not working?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

location and file extension regex

Musta Fa December 03, 2016 07:22AM

Re: location and file extension regex

Francis Daly December 03, 2016 09:08AM

Re: location and file extension regex

Musta Fa December 03, 2016 09:30AM

Re: location and file extension regex

Francis Daly December 03, 2016 09:56AM

Re: location and file extension regex

Musta Fa December 03, 2016 10:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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