日記書いたりメモ書いたり
robots.txtこのサイトでも robots.txt はもちろん使っている。bot を Disallow: / にする基準は自分で二つ決めている。
robots.txt の Disallow の記述を守るか?平たく言ってしまえば、行儀の悪い輩を追い出してると言ったところ。追い出し方は、robots.txt で Disallow: / として禁止令を出し、かつ .htaccess で robots.txt 以外にアクセスできないようにするという嫌がらせ的なやり方。これをやると、robots.txt 以外では 403 で弾かれる。それなのに、Baiduspider は数週間にわたってアクセスし続けた。ほんっとに行儀が悪い。
一応 robots.txt を見やすくしてみる。ついでに .htaccess の一部も。ちなみに、deny の後半部分はウィルスバスターの糞機能を弾くためのもの。
User-agent: *Sitemap: http://bsakatu.s201.xrea.com/sitemap.xmlSitemap: http://bsakatu.s201.xrea.com/sitemap_mt.xmlDisallow: /cgi-bin/MT4i/Disallow: /x/Crawl-delay: 20
User-agent: baiduspiderDisallow: /
User-agent: TwicelerDisallow: /
User-agent: YodaoBotDisallow: /
User-agent: MaSagoolDisallow: /
SetEnvIf User-Agent "QihooBot" BadbotSetEnvIf User-Agent "Baiduspider" BadbotSetEnvIf User-Agent "Twiceler" BadbotSetEnvIf User-Agent "YodaoBot" BadbotSetEnvIf User-Agent "MaSagool" Badbot
order allow,denyallow from alldeny from env=Badbotdeny from 66.180.82.81/28deny from 128.241.20.81/28# deny from 66.35.255.81/28deny from 128.241.20.211/28
<Files robots.txt>
allow from all
</Files>