Link to home
Start Free TrialLog in
Avatar of everactive
everactive

asked on

.htaccess: Deny from all

Hello,

This is working:

<Files *.fileext>
      Order Allow,Deny
      Deny from all
</Files>

This is not:

<Files *.fileext|somedirectory>
      Order Allow,Deny
      Deny from all
</Files>

Please help.
Avatar of Steve
Steve
Flag of Australia image

umm are you trying to protect the *.fileext in the /somedirectory folder ? or protect the somedirectory folder altogether ?

please explain what you are trying to protect..

Cheers
ASKER CERTIFIED SOLUTION
Avatar of Steve
Steve
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of schwomp
schwomp

Hello.

<DirectoryMatch "somedirectory">
  Order Allow,Deny
  Deny from all
</DirectoryMatch>

Hope it helps.
Avatar of MAHMED
Hi,

You can follow that structure:

DocumentRoot /var/www
<Directory /var/www>
    Allow from all
    Deny from none
    Order deny,allow
</Directory>
<Directory /var/www/*>
    Deny from all
</Directory>