Forum Moderators: phranque
I set up an .htaccess file in the directory I want to protect, it looks like this:
AuthUserFile /services/webpages/m/y/mysite.com/public/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthType Basic require user testing
I set up the .htpasswd in the root directory (above the directory that's Web-accessible), it looks like this:
testing:956xkFuvbOmIw
When I go to a page in the directory that I wanted protected, the box pops up asking for the password, but when I type in the correct password the box just pops up again. When I finally hit cancel, the 401 page comes up: "Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required."
Does this mean I put the .htpasswd file in the wrong directory somehow? I've tried moving it to a couple of other directories, just in case, but I haven't yet been able to get it to work. Can anyone shed light on this for me?