Advertisement
rAthus

.htaccess password protection for a specific domain

Nov 30th, 2023 (edited)
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. ### password protection for a specific domain name:
  2. <If "req('Host') == 'dev.example.com'">
  3. AuthName "Staff Only"
  4. AuthType Basic
  5. AuthUserFile /home/example/www/.htpasswd
  6. Require valid-user
  7. </If>
  8.  
  9. ### if you want to allow a specific folder to be public, put these two lines (uncommented) in a .htaccess file at folder's root:
  10. #Allow from all
  11. #Satisfy any
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement