htaccess not blocking spam/IPs
-
Hello all,
My website is running on IIS7 on SBS 2008. The blog is setup as domain.com/blog. I have the .htaccess file located in the domain.com/blog directory with the following:
# Protect from spam bots
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog C:/inetpub/wwwroot/mydomain.com/blog/rewrite_log.txt
RewriteLogLevel 2
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.mydomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^https://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule># block ips
Order allow,deny
Deny from 216.152.251.6
Deny from 36.250.178.161
Deny from 199.15.234.44
Allow from all# BEGIN WordPress
However, I’ve tried adding IP addresses of people outside the LAN to test and they are still able to comment. I also have nothing in the rewrite_log.txt file notifying me that it’s working.
Any suggestions?
- The topic ‘htaccess not blocking spam/IPs’ is closed to new replies.