Skip to content

Instantly share code, notes, and snippets.

@psaunders88
Created April 12, 2016 13:54
Show Gist options
  • Save psaunders88/001d0bf825b9b8a38c1606ef131b9072 to your computer and use it in GitHub Desktop.
Save psaunders88/001d0bf825b9b8a38c1606ef131b9072 to your computer and use it in GitHub Desktop.
A reminder of how I stopped someone trying to brute force a client site
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# Added to stop us serving content to internal dummy connections
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
#End of added
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<Files xmlrpc.php>
Order allow,deny
Deny from all
</Files>
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment