apache、iis6、ii7獨立ip主機屏蔽攔截蜘蛛抓取(適用vps云主機服務器)
* Apache:通過在網站主機的.htaccess文件中添加下面一行代碼即可實現: `SetEnvIfNoCase User-Agent "bot|crawl|spider|Yahoo|ia_archiver| other_spider|Googlebot" bad_bot` * IIS6:打開IIS管理器,右鍵點擊網站,點擊“屬性”,然后選擇“文件夾”,點擊高級,在高級屬性中勾選“拒絕請求標頭中指定的 User-Agents”,然后點擊“編輯”,在左側添加User-Agent,如“bot| crawl| spider| Yahoo| ia_archiver| other_spider| Googlebot”即可。 * IIS7:右鍵點擊網站,點擊“管理網站”,點擊“自定義錯誤”,在錯誤頁面中添加403.6錯誤,勾選“拒絕請求標頭中指定的 User-Agents”,然后點擊“編輯”,在左側添加User-Agent,如“bot| crawl| spider| Yahoo| ia_archiver| other_spider| Googlebot”即可。