Fix for protect staging sites with a password

  1. # Match all public hosts with one or more regex.
  2. SetEnvIfNoCase Host ^drupal\.org PUBLIC_SITE=1
  3.  
  4. # Allow everyone to see a public site
  5. Allow from env=PUBLIC_SITE
  6. Deny From All
  7.  
  8. # Define another method they could be allowed via password
  9. <IfModule mod_auth_digest.c>
  10.  AuthType Digest
  11.  AuthName "private area"
  12.  AuthDigestDomain /
  13.  AuthDigestFile ./passwds
  14.  Require valid-user
  15. </IfModule>
  16.  
  17. # If either the Allow or valid-user are satisfied, allow them in.

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.