Reputation: 7210
My goal is similar to the question asked here:
How to remove .htaccess password protection from a subdirectory
a .htaccess
file protects all index.html
files in subdirectories. I want to exclude a particular subdirectory from this rule.
However, even though I created the .htaccess
file in said subdirectiory with the following content:
Require all granted
I am still requested for authentication from a .htaccess
file at the higher directory:
DirectoryIndex index.html
<FilesMatch "index.html">
AuthUserFile /etc/users
AuthName "Protected"
AuthGroupFile /dev/null
AuthType Basic
Require valid-user
</FilesMatch>
How can I override this FilesMatch block in a sub directory so the login is not requested? In my apache configuration file:
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
I do have AllowOverride
set properly. What am I doing wrong?
Upvotes: 1
Views: 915
Reputation: 785266
In your subdirectory/.htaccess
have these 2 lines to prevent auth:
Satisfy Any
Allow from all
Upvotes: 2