.htaccess password protection for a specific domain
### password protection for a specific domain name:
<If "req('Host') == 'dev.example.com'">
AuthName "Staff Only"
AuthType Basic
AuthUserFile /home/example/www/.htpasswd
Require valid-user
</If>
### if you want to allow a specific folder to be public, put these two lines (uncommented) in a .htaccess file at folder's root:
#Allow from all
#Satisfy any
Comments