Answer the question
In order to leave comments, you need to log in
How to put a password on the root directory through .htaccess, except for the images directory?
How to put a password on the root directory through .htaccess, with the exception of the images directory,
set the password, but how to exclude the directory?
AuthType Basic
AuthName "Thats protected Area!"
AuthUserFile /var/www/admin/data/www/*****/.htpasswd
Require valid-user
<Files .htpasswd>
deny from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
DirectoryIndex index.php
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
SetEnvIf Request_URI "(/directory/)$" allow
Order allow,deny
Allow from env=allow
Satisfy any
You can also create .htaccess in that folder and add Satisfy any
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question