Forum Moderators: phranque
Cheers
-- /home/username/public_html/.htaccess --
AuthType Basic
AuthName "Testing"
AuthUserFile "/home/username/public_html/.htpasswd"
require user user1
--
-- /home/username/public_html/subdomain/.htaccess --
Allow From All
Redirect /subdomain [subdomain.sitename.com...]
--
You can do what you want to do by putting the exclusion in the server httpd.conf configuration file.
You can also rearrange your deny,allow stuff to allow access based on an environment variable set if the subdomain matches, as well as from valid user, and set "Satisfy any" so that either will allow access to the subdirectory.
SetEnvIf Host "^(www\.)?[i]open_subdomain[/i]\.yourdomain\.com" openhost
AuthType Basic
AuthName Testing
AuthUserFile /home/username/public_html/.htpasswd
Satisfy any
Require user user1
Order allow,deny
Allow from openhost
The above code may not be exactly what you need, so you'll probably have to modify it.
Jim
What method would you use to exclude the sub-directory in httpd.conf?
Jim