: 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
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?
More posts by @Fox8124981
1 Comments
Sorted by latest first Latest Oldest Best
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]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.