• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

overriding password in subdirectory

suklee

Diamond Member
I have a htaccess/htpasswd protecting my root directory i.e. public_html/

What I want is to have a subdirectory excluded from this authentication, i.e. public_html/test - everyone should be able to connect without typing in any password.

I found this thread http://www.webmasterworld.com/forum92/1137.htm but when I access the subdomain test.mydomain.com (which is really public_html/test) it still asks me the password for the root password.

Any ideas? Here is what I have in my htaccess (root)

SetEnvIf Host "^(www\.)?test\.mydomain\.com" openhost
AuthType Basic
AuthName Testing
AuthUserFile /home/mydomain/public_html/.htpasswd
Satisfy any
Require user user1
Order allow,deny
Allow from openhost

PS. Just got reply from Bluehost that this is impossible?
 
Ran a quick search through google on this subject, and just tested it on my server and saw that it worked. While I'm not sure what all of its ramifications are, the following method WILL open up your folder to the public while its parent folder is secured.

Add the following line:
Satisfy any
to your .htaccess file.

*edit

As I see that you already have that line in your example, you may want to try that line by itself, with no other lines of code in the .htaccess file.
 
Wow, nice Google work! I used only that line and surprise surprise, it does let me in at the subfolder without password! The root is still pw protected.

Let me ask the folks at Bluehost if they know any negative ramifications of this.
 
Back
Top