How To Unprotect A Folder In Apache
The Apache HTTP web-server makes it easy to protect a folder (and its sub-folders) with a username/password prompt. Simply create a .htaccess file in the specified folder, and add something like this:
AuthName "Folder Protection" AuthUserFile /path/to/.htpasswd AuthGroupFile /dev/null AuthType Basic Require valid-user
For help with generating a valid .htpasswd file, you can use a tool like Dynamic Drive’s .htaccess Password Generator. There are plenty of tutorials online that explain this process.
On the other hand, it’s much harder to find information about unprotecting a sub-folder of a folder that is protected in the manner specified above. Some posts I read implied that it wasn’t possible at all. I finally found the answer here and here. Basically, in the sub-folder you’re trying to unprotect, you simply need to create a new .htaccess file and add the following:
Satisfy Any
Titash (Feb 23, 2008)
Hi Moggy, I was curious how you’re able to display Archives and Tags as a page element in this site?
I know it is little irrelevent to the topic but i don’t know how to reach you in person!
Yan (Oct 24, 2008)
Awesome! I’ve been searching for this for a while.
Paul (Aug 05, 2010)
Me too!! Thanks!