Google Sitemaps の微調整

| No TrackBacks

Movable Type で Individual Archive を YYYY/MM/DD/foo/index.php というような形式にしていて、
Google Sitemaps を Google Sitemaps Generator の directory メソッド
で生成していると、YYYY/MM/DD/foo/ というディレクトリもサイトマップに含まれる。

httpd.conf などで Directory Listing を停止したりしていれば、クローラがやってきても Forbidden が返っておわりなので、かまわないといえばかまわないのかもしれないけど、そもそも余計な URL はサイトマップにいれない、
というのもスジだろう。

というわけで、Google Sitemaps Generator の config.xml で以下のような Filter をかけておくとよいかもしれない。

  <filter  action="drop"  type="regexp"    pattern="archives/\d{4}/\d{2}/\d{2}/$"     />

2006/05/10 に foo と bar というエントリを書いたとして、


  • archives/2006/05/10/foo/
  • archives/2006/05/10/bar/

というパスはクロールしてほしいけど、archives/2006/05/10/ をクロールしてもらっても意味無し、だから、それはサイトマップから削ろう、という話。

No TrackBacks

TrackBack URL: http://www.grid5.net/mt/mt-trackback.cgi/502

About this Entry

This page contains a single entry by dxy published on 2006年5月10日 15:54.

Movable Type のフィード配信に関する変更 was the previous entry in this blog.

Dell PowerVault 124T のハードウェアトラブル is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 5.01