Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove .htaccess password protection from a subdirectory

I have password protected my entire website using .htaccess but I would like to expose one of the sub directories so that it can be viewed without a password.

How can I disable htaccess password protection for a sub directory? Specifically what is the .htaccess syntax.

Here is my .htaccess file that is placed in the root of my ftp.

 AuthName "Site Administratrion" AuthUserFile /dir/.htpasswd AuthGroupFile /dev/null  AuthName secure AuthType Basic require user username1 order allow,deny allow from all 
like image 620
justinl Avatar asked Sep 16 '09 06:09

justinl


People also ask

What is htaccess protection?

htaccess and . htpasswd files are protected from all external access. This is super important because you do not want anyone or anything to access these sensitive and powerful files. If you are unsure, or just want to be extra secure, continue reading to learn how to protect all of your .


1 Answers

You need to create a new .htaccess file in the required directory and include the Satisfy any directive in it like so, for up to Apache 2.3:

# allows any user to see this directory Satisfy Any 

The syntax changed in Apache 2.4, this has the same effect:

Require all granted 
like image 69
RageZ Avatar answered Sep 22 '22 02:09

RageZ