htaccess passwords and subdirectories

Associate
Joined
17 Oct 2002
Posts
2,177
Location
London
While I'm developing my site I've password protected the entire thing by adding to the htaccess file in my html root folder.

Code:
AuthType Basic
AuthName "site"
AuthUserFile "path/to/my/password/file"

require valid-user
This works fine but I want to have a public subdirectory accessible to the world without a password. I have been completely unable to find a way to override the Authorisation directive I placed in the root.

Basically what I want is:

/html_root/ - passworded
/html_root/dir1/ - passworded
/html_root/dir2/ - passworded
/html_root/public/ - no password

Does anyone know if it is possible?
 
Thanks for the pointer :)

I created an htaccess file in my pub directory with the following and it works fine.
Code:
Allow from all
Satisfy any
 
Back
Top Bottom