Skip to content

Instantly share code, notes, and snippets.

@JBlond
Created April 3, 2018 13:18
Show Gist options
  • Save JBlond/eb16294a7542d96b37c2bfd4812f0d15 to your computer and use it in GitHub Desktop.
Save JBlond/eb16294a7542d96b37c2bfd4812f0d15 to your computer and use it in GitHub Desktop.
htaccess if host matches
<If "%{HTTP_HOST} == 'dev.example.com'">
AuthType basic
AuthName "private"
AuthUserFile /home/example/.htpasswd
Require valid-user
</If>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment