Skip to content

Instantly share code, notes, and snippets.

@shameemreza
Created October 11, 2018 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shameemreza/df7f2d70aa769f376fed05a35a3d3030 to your computer and use it in GitHub Desktop.
Save shameemreza/df7f2d70aa769f376fed05a35a3d3030 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment