Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Created July 17, 2017 06:07
Show Gist options
  • Select an option

  • Save lbvf50mobile/c71ff8de5a3b656eaff2da33c96bcb5d to your computer and use it in GitHub Desktop.

Select an option

Save lbvf50mobile/c71ff8de5a3b656eaff2da33c96bcb5d to your computer and use it in GitHub Desktop.
Split htpasswd for heroku and local server
AuthType Basic
AuthName "Please enter the password"
<If "%{HTTP_HOST} == 'myapp.herokuapp.com'">
AuthUserFile /app/web/.htpasswd
</If>
<Else>
AuthUserFile .htpasswd
</Else>
Require valid-user
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment