anantshri/wp-security/master/htaccess/comment_spam_post.htaccess - Htaccess File

anantshri/wp-security/master/htaccess/comment_spam_post.htaccess

#Stop Comment Posting without proper Referer
# Ref : http://www.slideshare.net/erchetansoni/complete-wordpress-security-by-chetan-soni-sr-security-specialist-at-secugenius-security-solutions

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]

On Github License

Files

Download PDF of Htaccess file
HTTP_REFERER, HTTP_USER_AGENT, POST, REMOTE_ADDR, REQUEST_METHOD, REQUEST_URI

Comments

Apache