Last active
November 2, 2018 12:13
-
-
Save fedir/b1ad5c052cf415d259ad90f64bb39886 to your computer and use it in GitHub Desktop.
.htaccess, Private domain access from selected IPs only, with a redirect to fallback domain
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
RewriteCond %{REMOTE_ADDR} !^XX\.XX\.XX\.XX$ | |
RewriteCond %{REMOTE_ADDR} !^XX\.XX\.XX\.XX$ | |
RewriteCond %{HTTP_HOST} ^(private-domain) [NC] | |
RewriteRule ^(.*)$ http://fallback-domain$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment