Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #allows a single uri through the .htaccess password protection
  2. SetEnvIf Request_URI "/testing_uri$" test_uri
  3.  
  4. #allows everything if its on a certain host
  5. SetEnvIf HOST "^testing.yoursite.com" testing_url
  6. SetEnvIf HOST "^yoursite.com" live_url
  7. Order Deny,Allow
  8.  
  9. AuthName "Restricted Area"
  10. AuthType Basic
  11. AuthUserFile /path/to/your/.htpasswd
  12. AuthGroupFile /
  13. Require valid-user
  14.  
  15. #Allow valid-user
  16. Deny from all
  17. Allow from env=test_uri
  18. Allow from env=testing_url
  19. Allow from env=live_url
  20. Satisfy any
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement