Welcome! Log In Create A New Profile

Advanced

Deny access per extension in multiple locations

nfn
October 07, 2010 12:07PM
Hello,

I have this rule in apache that denies access to some extensions in multiple locations.
I have this .htaccess in some folders like uploads, docs, pdfs.

<Files ~ "^.*\.(php|cgi|pl|php3|php4|php5)">
Order allow,deny
Deny from all
</Files>

How can I join this in one line to deny access in multiple folders for these extensions?

I was trying this without success:

location ~ /(uploads/|docs/|pdfs/)*\.(php|cgi|pl|php3|php4|php5)$ {
root /srv/www/portaldasviagens.com/public;
deny all;
}

Thanks
Subject Author Posted

Deny access per extension in multiple locations

nfn October 07, 2010 12:07PM

Re: Deny access per extension in multiple locations

António P. P. Almeida October 07, 2010 12:44PM

Re: Deny access per extension in multiple locations

António P. P. Almeida October 07, 2010 12:48PM

Re: Deny access per extension in multiple locations

Francis Daly October 07, 2010 06:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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