Write another ".htaccess" file in it.
I suspect that won't work. The root directory (
public_html/) will be visited first, so you will have to clear the id/password hurdle there before moving on to a lower level directory (the add-on). I haven't heard of any way to "retroactively" cancel out the request for an id/password in a higher level directory. If anyone knows how, that would be useful information to know. I tried it with a password-protected directory, and a directory below it. To go directly to the subdirectory, I first had to enter the id/password for the parent directory. Adding an empty
.htaccess to the subdirectory didn't change anything.
I tried the following instructions:
http://www.mangoorange.com/2008/09/19/authtype-none/ to add a clause to the parent directory's
.htaccess file to permit free access to the subdirectory, but I only got 500 errors ("Directory not allowed here") for my troubles (I left out all the Python stuff and only used the last 3 lines). It's not clear to me whether the technique given is to leave one of a group of sibling directories unprotected, while password protecting the rest, or whether it's supposed to work for a parent-child relationship (which is what you want). I suspect that if there
is a way to do that, if would have to be an exception clause <Directory
dir-name> in the
.htaccess file asking for password control, rather than something in the subdirectory.
As
madscape said, you're probably going to have to restructure your primary site so there's nothing valuable in the root directory, and just password-protect lower level directories. Using information on the site I linked to, you
may be able to set up password protection for any desired set of directories all in one go, without adding each one separately in cPanel.
Nevertheless, I'd love to know how to exempt lower level directories from a password-protected higher level, so if anyone knows, please post!