与其他人一样,我无法阻止我网站上的一系列IP地址。我的.htaccess文件:
Order Deny,Allow
Deny from 46.229.168/24
Deny from 5.9.63/24
Deny from 216.244.66/24
BrowserMatchNoCase SemrushBot bad_bot
Order Deny,Allow
Deny from env=bad_bot
有了这些线路,日志中仍会出现超过5000个机器人。例子:
46.229.168.68 - - [08/Feb/2018:21:55:37 -0600] "GET /index.php/calendar/year.listevents/2015/04/26/15 HTTP/1.1" 500 850 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
46.229.168.77 - - [08/Feb/2018:21:56:03 -0600] "GET /index.php/calendar/year.listevents/2011/6/07/7 HTTP/1.1" 500 850 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
46.229.168.70 - - [08/Feb/2018:21:56:12 -0600] "GET /index.php/component/jevents/day.listevents/2010/01/18/7?Itemid=5 HTTP/1.1" 500 850 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
46.229.168.77 - - [08/Feb/2018:21:56:12 -0600] "GET /index.php/calendar/year.listevents/2011/6/07/7 HTTP/1.1" 500 850 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
46.229.168.73 - - [08/Feb/2018:21:56:26 -0600] "GET /index.php/component/jevents/day.listevents/2012/07/24/-?Itemid=5 HTTP/1.1" 500 850 "-" "Mozilla/5.0 (compatible; SemrushBot/1.2~bl; +http://www.semrush.com/bot.html)"
4
我已经注意到日志中有关这些行的一些事情。他们不包含网站的全名。这可能来自网站内部,其次是" semrush"以小写字母开头。
我很感激任何可以改进htaccess文件中的行的建议。