.htaccess tutorial

htaccess Elite


htpasswd authentication not showing popup

Security in htaccess: htpasswd, 401 Authentication

htpasswd authentication not showing popup

Postby mmorenz » 03 Apr 2009 09:57

Hi, I'm Marc, newbie in the forum.

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!
mmorenz
 
Posts: 1
Joined: 03 Apr 2009 09:41

Return to Security and Authentication



cron