0

I have a folder which is in my public_html folder that I want to password protect.

In that folder I have an .htaccess file which points towards a password file outside of the public_html folder.

AuthType Basic
AuthName "Please Log In"
AuthUserFile "/home/mysite/.htpasswds/public_html/admin/passwd"
require valid-user

So when I visit mysite.com/admin/

It asks for a username and password this is what I need it to do!! :)

But when I visit mysite.com/

It still asks for a username and password.

And I don't want visitors to have to click cancel when they visit the site.

How do I make it that the username and password is only asked when the sub-directory is visted?

0 Answers0