将下方代码直接放置在网站伪静态规则里即可
C
if ($http_user_agent ~* "windows") { return 444; } #屏蔽电脑端if ($http_user_agent ~* "MicroMessenger") { return 444; } #屏蔽微信if ($http_user_agent ~* "QQ/") { return 444; } #屏蔽QQ内 if ($http_referer ~* "baidu.com|sogou.com|so.com|google.com|bing.com|sm.cn") { return 444; } if ($http_user_agent ~* "SemrushBot|python|AhrefsBot|hubspot|opensiteexplorer|leiki|webmeup|Baiduspider|baiduspider|sogou spider|sogou web|360spider|Bytespider|toutiao|Sosospider|YodaoBot|msnbot|Googlebot|Amazonbot|dataforseo|DataForSeoBot|semrush|babbar|mj12bot|116.0.0.0") { return 444; } #屏蔽各大搜索引擎