Created
June 6, 2013 17:23
-
-
Save Critter/5723246 to your computer and use it in GitHub Desktop.
Redirect all except my IP to subdirectory using .htaccess
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
# my ip | |
RewriteCond %{REMOTE_HOST} !^255\.255\.255\.255 | |
# this prevents looping | |
RewriteCond %{REQUEST_URI} !^/maintenance/? | |
RewriteCond %{REQUEST_URI} /(.*)$ | |
# the redirect | |
RewriteRule (.*) /maintenance [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment