Created
February 1, 2013 17:43
-
-
Save johnschrom/4692841 to your computer and use it in GitHub Desktop.
Sometimes you want to block certain IP addresses from accessing your website. Add this snippet to your .htaccess, change "IP-ADDRESS" to be their IP address, and they'll get forwarded to your specified URL.
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_HOST} IP-ADDRESS | |
RewriteRule .* "http://www.google.com" [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment