Created
June 9, 2018 19:34
-
-
Save emarthinsen/5d2954b5bf0c11f468bef2ccf3377b37 to your computer and use it in GitHub Desktop.
.htaccess if directive to force basic auth on staging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<If "(%{HTTP_HOST} =~ /staging/) && ! (%{REQUEST_URI} =~ /privacy-policy$/)"> | |
AuthType Basic | |
AuthName "Staging Area" | |
AuthUserFile /var/app/current/public/.htpasswd | |
Require valid-user | |
</If> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've tried simplifying this a bit using a different syntax. Here's where I'm at now: