Mobile app version of vmapp.org
Login or Join
Fox8124981

: How to block a spam bot .htaccess proper formatting? I have downloaded my access log file from my cPanel and found I have a bot I would like to stop. In the access log, there User-Agent

@Fox8124981

Posted in: #Htaccess #Spam #SpamBlocker #WebCrawlers

I have downloaded my access log file from my cPanel and found I have a bot I would like to stop. In the access log, there User-Agent string reads the following;


88.80.205.219 - - [08/May/2014:23:29:52 -0500] "GET / HTTP/1.0" 301 - "-" "-"
88.80.205.219 - - [08/May/2014:23:29:56 -0500] "GET / HTTP/1.0" 200 29019 "-" "-"


What is the proper format in my .htaccess file to block this bot only?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8124981

1 Comments

Sorted by latest first Latest Oldest Best

 

@Looi9037786

To block all "blank" User-Agents or User-Agents consisting of a hyphen, you could use the following in your .htaccess

RewriteCond %{HTTP_USER_AGENT} ^-?$
RewriteRule ^ - [F]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme