Last active
April 6, 2018 12:32
-
-
Save r3code/39c9e770479ce9b3a4726122bbd618f7 to your computer and use it in GitHub Desktop.
htaccess for password protect based on domain name (for multisite CMS dev)
This file contains hidden or 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
| # Password protect for site.ru while in DEV | |
| SetEnvIf host ^site\.ru$ noauth=1 | |
| SetEnvIf host ^www\.site\.ru$ noauth=1 | |
| # Put your password auth stuff here | |
| AuthName 'Restricted Area site.ru' | |
| AuthType Basic | |
| AuthUserFile /path/to/.authfile | |
| Require valid-user | |
| #Here is where we allow/deny | |
| Order Deny,Allow | |
| Satisfy any | |
| Deny from all | |
| Require valid-user | |
| Allow from env=noauth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment