nginx设置只允许蜘蛛访问其他访问为404或者301跳转 ngxinx设置只允许百度360蜘蛛访问,其他任何IP或者蜘蛛访问为404状态 if ($http_user_agent !~* "Baidu|Yisou|Sogou|Google|360") { return 404;