Created
March 10, 2015 12:05
-
-
Save manfromanotherland/7fb17f7dec1dc65ab8a9 to your computer and use it in GitHub Desktop.
.htaccess: Temporary redirect to /dir with IP rule #snippet
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
# ---------------------------------------------------------------------- | |
# TEMP REDIRECT TO /DIR | |
# ---------------------------------------------------------------------- | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.1 | |
RewriteCond %{REQUEST_URI} !/DIR$ [NC] | |
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | |
RewriteRule .* /DIR [R=302,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment