Created
January 7, 2015 22:47
-
-
Save dlangille/2ef8eb8e339a929647b4 to your computer and use it in GitHub Desktop.
Give a 404 for certain IP ranges when they try to login
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
<Directory "/path/to/wordpress/"> | |
AllowOverride AuthConfig | |
Options ExecCGI FollowSymLinks | |
Order allow,deny | |
Allow from all | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} ^188.143.234. [OR] | |
RewriteCond %{REMOTE_ADDR} ^188.143.235. | |
RewriteRule ^wp-login.php / [R=404] | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment