For reduce spam in wordpress comment i using below code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*domainname.com* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
My question is: I want to reduce spam in "signup". The url like this http://www.domain.com/signup
How to change this line:
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
Become Signup ???
Please help me, thank you.
The code in .htaccess stops spam by saying:
When accessing the file wp-comments-post.php(which is the file that handles the posting of comments) and the visitor doesn't come from the yourdomain or the user agent of the browser is empty, we can block it.
The reason is that when somebody posts a comment, they have clicked on a button on your site and so the referrer is yourdomain.com
I'm assuming you don't really want this for the page signup as well. People could directly access that page and you want them to sign up.
To reduce spam in signup, it's better to know how the signup works. WordPress doesn't have a page signup, so I'm assuming you are using a 3rd party plugin for signup.