Lately I password protected a subdirectory of my website (mywebsite-com/folder)
- Code: Select all
[quote]AuthUserFile /home/username/.htpasswd
AuthGroupFile /dev/null
AuthName "Private Area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>[/quote]
On the parent folder I have a redirection (mywebsite-com)
- Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/folder [NC]
RewriteCond %{HTTP_HOST} ^(www.)?mywebsite.com$
RewriteRule ^(.*)$ "http\:\/\/www\.mywebsite\.com\/shop\/$1" [R=301,L]
The result of typing in a browser www.mywebsite.com/folder is, instead of a popup asking for username and password, a 401 authentication error.
I tripled checked the htpasswd file and it's path and I cannot find any explanation for that.
I would appreciate some help,
Thanks!