Step 5 of 8 | Menu

Step 5 Modify .htaccess

1 min read

Add the following code to your root.htaccess to lessen spam # Protect from spam bots <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L] </IfModule> You should also replace your URL “” with your blog URL.


Log in or Sign up to comment