看板FreeBSD
標 題Re: 如何阻擋搜尋網站用 robot 抓取網頁~
發信站交大資科_BBS (Sat Jan 8 09:15:28 2005)
轉信站ptt!ctu-reader!ctu-peer!news.nctu!news.cis.nctu!cis_nctu
==> 在 [email protected] (蛋餅) 的文章中提到:
> 一般來說都是設定 robots.txt 即可~
> 但是要放在哪裡才能真正作用?
> Apache 裡的 Document Root 指定的位置就好...
> 還是說連 Visual Host 的每個路徑都要?
> 而且發現, robots.txt 對大陸的 baidu(百度: http://www.baidu.com/)無效~
> 但是 baidu 抓取的資料量又是最多的(死大陸仔)~
> 有沒有辦法可以阻擋?
你可以參考
http://www.w3.org
http://www.w3.org/robots.txt
robots.txt 的語法:"<field>:<optionalspace><value><optionalspace>"
User-agent:
是用來描述 Spider (Agent) 的名稱,你可以用 * 代表全部
Disallow:
用來設定目錄,你可以用 / 代表全部
因此:
User-agent: *
Disallow: /
這兩行可以禁止所有的 Agent
不過,有些 Agent/Spider 是可以不遵循 robots.txt
附上常見 Robots 的名稱
Googlebot
http://www.google.com/
Slurp
http://www.inktomi.com/
MSNBOT
http://search.msn.com/
Scooter
http://www.altavista.com/
FAST-WebCrawler
http://www.alltheweb.com/
ia_archiver
http://www.alexa.com/
Baiduspider
http://www.baidu.com/
-
交大資科 BSD/Chinese/Chinfost/Coffee/Database/Destiny/Economics/FoodStuff
GreenEarth/MB/Mobile-comm/Multimedia/PDA/Radio/Security/Tea/Wine/X-files 板主
莊昭雄 (Richard Chuang) IEEE Standard, Associate:
[email protected]
>>>>> O, God, the sea is so great and my boat is so small <<<<<
--
* Post by Mild7 from telnet.hinet.net
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>