Skip to content

Instantly share code, notes, and snippets.

@NinjaPress
Created February 23, 2012 23:14
Show Gist options
  • Save NinjaPress/1895634 to your computer and use it in GitHub Desktop.
Save NinjaPress/1895634 to your computer and use it in GitHub Desktop.
Como proteger seu site ou blog Wordpress da ação de spammers via .htaccess
# Protect from spam comments
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*seu-dominio.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment