Created
May 5, 2020 09:42
-
-
Save vfontjr/3dadc12d958c646257f3ed9acd70757e to your computer and use it in GitHub Desktop.
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
# Stop spam/brute force attack logins and comments | |
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} POST | |
RewriteCond %{REQUEST_URI} .(wp-comments-post|wp-login).php* | |
RewriteCond %{HTTP_REFERER} !.*example.com.* [OR] | |
RewriteCond %{HTTP_USER_AGENT} ^$ | |
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L] |
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
# Stop spam/brute force logins and comments | |
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} POST | |
RewriteCond %{REQUEST_URI} .(wp-comments-post|wp-login).php* | |
RewriteCond %{HTTP_REFERER} !.*(example.com|example2.com|example3.com|example4.com).* [OR] | |
RewriteCond %{HTTP_USER_AGENT} ^$ | |
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L] |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} ^/wp-login.php$ [NC] | |
RewriteRule ^.*$ - [F,L] |
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
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^135.135.135.246$ | |
RewriteCond %{REQUEST_URI} ^/wp-login.php$ [NC] | |
RewriteRule ^.*$ - [F,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment