Nginx环境
if ($http_user_agent ~* (SemrushBot|DotBot|MJ12bot|AhrefsBot|ZoominfoBot|BLEXBot|Python|PetalBot|Barkrowler)) { return 403; }
Apache环境
SetEnvIfNoCase ^User-Agent$ .*(SemrushBot|DotBot|MJ12bot|AhrefsBot|ZoominfoBot|BLEXBot|Python|PetalBot|Barkrowler) BADBOT Order Allow,Deny Allow from all Deny from env=BADBOT
原创文章,作者:howkunet,如若转载,请注明出处:https://www.intoep.com/othen/62381.html