You are using IPv4 :(

HabariでUTF-8以外の文字コードを使用しているブログからPingbackを受け取る

Habariはデフォルトで文字コードがUTF-8に設定されているので問題なくUTF-8なBlogからのPingbackを受信することが出来ます。
しかし、古いバージョンのWordPress ME等は文字コードにEUC-JPを使用しているため、これらのブログからのPingback文字化けしてしまいます。

そこでPingback受信時に送信元ブログの文字コードを取得してUTF-8以外であれば文字コードを変換するパッチを書いてみました。
パッチを適用するには下記のパッチをダウンロード後、Habariのルートディレクトリでpatch -p0 pingback.plugin.php.r1747.mbconv.diff してください。

HabariProjectにもこのパッチを送ってあるのですが、現在はVer 0.5にむけてリポジトリがFeature Freezeにはいっているためすぐにcommitしてもらうのは難しそうです。

pingback.plugin.php.r1747.mbconv.diff


--- system/plugins/pingback/pingback.plugin.php.orig    2008-05-23 05:49:42.000000000 +0900
+++ system/plugins/pingback/pingback.plugin.php 2008-05-23 06:15:36.000000000 +0900
@@ -150,6 +150,16 @@
                        }
                        $source_contents= $rr->get_response_body();

+                       // for Multi-byte
+                       if ( function_exists ( 'mb_convert_encoding' ) ) {
+                               // TODO: $habari_encoding= Options::get('encoding');
+                               $habari_encoding= 'UTF-8';
+
+                               if ( preg_match( "/]+charset=([A-Za-z0-9\-\_]+)/i", $source_contents, $matches ) !== false && strtolower( $habari_encoding ) != strtolower( $matches[1] ) ) {
+                                       $source_contents= mb_convert_encoding( $source_contents, $habari_encoding, $matches[1] );
+                               }
+                       }
+
                        // Find the page's title
                        preg_match( '/(.*)<\/title>/is', $source_contents, $matches );
                        $source_title= $matches[1];
</code></pre>        </div>
      </div>

            <div class="post" id="post-70">
        <h2><a href="http://ayu.commun.jp/2008/05/26/habari-revision">Habariにもリビジョン機能</a></h2>
        <ul class="post-meta">
          <li>May 26, 2008 7:57am</li>
<!--          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/icon_user.gif" alt="" />ayunyan</li> //-->
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/folder.gif" alt="" /><a href="http://ayu.commun.jp/tag/habari" rel="tag">Habari</a>, <a href="http://ayu.commun.jp/tag/wordpress" rel="tag">WordPress</a> and <a href="http://ayu.commun.jp/tag/plugin" rel="tag">plugin</a></li>
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/comment.gif" alt="" /><a href="http://ayu.commun.jp/2008/05/26/habari-revision#comments" title="Comments to this post">0Comments</a></li>
        </ul>
        <div class="post-contents">
          <div class="socialink"><a href="mailto:?subject=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD&body=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision" target="_blank" title="Post to Email" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/email.png" width="16" height="16" alt="Post to Email" style="padding:0 3px;"></a><a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision" target="_blank" title="Post to Digg" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/digg.png" width="16" height="16" alt="Post to Digg" style="padding:0 3px;"></a><a href="http://delicious.com/save?url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision&title=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD&v=5&jump=yes" target="_blank" title="Post to delicious" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/delicious.png" width="16" height="16" alt="Post to delicious" style="padding:0 3px;"></a><a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision&title=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD','bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();" title="Post to Google" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/google.png" width="16" height="16" alt="Post to Google" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://b.hatena.ne.jp/add?mode=confirm&is_bm=1&title=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision','socialink','width=550,height=600,resizable=1,scrollbars=1');})();" title="Post to Hatena Bookmark" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/hatena.png" width="16" height="16" alt="Post to Hatena Bookmark" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD&u=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision&opener=bm&ei=UTF-8','socialink','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);})();" title="Post to Yahoo! JAPAN Bookmarks" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/yahoojbookmarks.png" width="16" height="16" alt="Post to Yahoo! JAPAN Bookmarks" style="padding:0 3px;"></a><a href="http://buzzurl.jp/entry/http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision" target="_blank" title="Post to Buzzurl" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/buzzurl.png" width="16" height="16" alt="Post to Buzzurl" style="padding:0 3px;"></a><a href="http://clip.livedoor.com/redirect?link=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F26%2Fhabari-revision&title=One+Wish...+-+Habari%E3%81%AB%E3%82%82%E3%83%AA%E3%83%93%E3%82%B8%E3%83%A7%E3%83%B3%E6%A9%9F%E8%83%BD&ie=utf-8" target="_blank" title="Post to livedoor Clip" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/livedoorclip.png" width="16" height="16" alt="Post to livedoor Clip" style="padding:0 3px;"></a></div><a href="http://farm3.static.flickr.com/2155/2543171146_6b0bc81d9c_o.jpg" class="thickbox"><img src="http://farm3.static.flickr.com/2155/2543171146_1e7e9a8daa_m.jpg" align="right" alt="Revision in Habari"></a><p>Masayanさんの記事「<a href="http://wp.mmrt-jp.net/2008/05/24/2906/">MMRT daily life - WordPress 2.6 はすごいらしい</a>」でWordPress 2.6にリビジョン管理機能が追加されることを知り、思わずこれ欲しいー<br>しかし、わたしは<a href="http://habariproject.org/">Habari</a>にスイッチした身の上 :P</p><p>そこで<a href="http://habariproject.org/">Habari</a>にもプラグインとしてリビジョン機能を追加してみました。:D<br>まだリリース段階ではありませんが、試してみたい方は<a href="http://trac.habariproject.org/habari-extras/">Habari-extras</a>に開発中のバージョンがあります。</p>        </div>
      </div>

            <div class="post" id="post-69">
        <h2><a href="http://ayu.commun.jp/2008/05/23/amazon-socialink-fckeditor-rate-it-habari-plugins-released">Amazon/Socialink/FCKeditor/Rate It!  Habari Plugins released!</a></h2>
        <ul class="post-meta">
          <li>May 23, 2008 4:28am</li>
<!--          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/icon_user.gif" alt="" />ayunyan</li> //-->
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/folder.gif" alt="" /><a href="http://ayu.commun.jp/tag/habari" rel="tag">Habari</a> and <a href="http://ayu.commun.jp/tag/plugin" rel="tag">plugin</a></li>
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/comment.gif" alt="" /><a href="http://ayu.commun.jp/2008/05/23/amazon-socialink-fckeditor-rate-it-habari-plugins-released#comments" title="Comments to this post">1Comment</a></li>
        </ul>
        <div class="post-contents">
          <div class="socialink"><a href="mailto:?subject=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21&body=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released" target="_blank" title="Post to Email" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/email.png" width="16" height="16" alt="Post to Email" style="padding:0 3px;"></a><a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released" target="_blank" title="Post to Digg" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/digg.png" width="16" height="16" alt="Post to Digg" style="padding:0 3px;"></a><a href="http://delicious.com/save?url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released&title=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21&v=5&jump=yes" target="_blank" title="Post to delicious" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/delicious.png" width="16" height="16" alt="Post to delicious" style="padding:0 3px;"></a><a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released&title=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21','bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();" title="Post to Google" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/google.png" width="16" height="16" alt="Post to Google" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://b.hatena.ne.jp/add?mode=confirm&is_bm=1&title=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released','socialink','width=550,height=600,resizable=1,scrollbars=1');})();" title="Post to Hatena Bookmark" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/hatena.png" width="16" height="16" alt="Post to Hatena Bookmark" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21&u=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released&opener=bm&ei=UTF-8','socialink','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);})();" title="Post to Yahoo! JAPAN Bookmarks" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/yahoojbookmarks.png" width="16" height="16" alt="Post to Yahoo! JAPAN Bookmarks" style="padding:0 3px;"></a><a href="http://buzzurl.jp/entry/http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released" target="_blank" title="Post to Buzzurl" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/buzzurl.png" width="16" height="16" alt="Post to Buzzurl" style="padding:0 3px;"></a><a href="http://clip.livedoor.com/redirect?link=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F23%2Famazon-socialink-fckeditor-rate-it-habari-plugins-released&title=One+Wish...+-+Amazon%2FSocialink%2FFCKeditor%2FRate+It%21++Habari+Plugins+released%21&ie=utf-8" target="_blank" title="Post to livedoor Clip" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/livedoorclip.png" width="16" height="16" alt="Post to livedoor Clip" style="padding:0 3px;"></a></div><p><p>4 new <a href="http://habariproject.org/">Habari</a> plugins are being released and published!<br><br>you can download from below, or <a href="http://trac.habariproject.org/habari-extras/">habari-extras</a> repository</p></p><ul>
<li><a href="/habari-amazon">Amazon</a> - easily/quickly insert Amazon Products into your posts.</li>
<li><a href="/habari-socialink">Socialink</a> - adding Social Bookmark Links to your posts.</li>
<li><a href="/habari-fckeditor">FCKeditor</a> - FCKeditor for Habari</li>
<li><a href="/habari-rateit">Rate It!</a> - adding Star Rating to your posts.</li>
 </ul>        </div>
      </div>

            <div class="post" id="post-63">
        <h2><a href="http://ayu.commun.jp/2008/05/21/how-to-install-habari-in-a-sub-directory-japanese">Habariをサブディレクトリにインストールする方法</a></h2>
        <ul class="post-meta">
          <li>May 21, 2008 12:05pm</li>
<!--          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/icon_user.gif" alt="" />ayunyan</li> //-->
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/folder.gif" alt="" /><a href="http://ayu.commun.jp/tag/habari" rel="tag">Habari</a> and <a href="http://ayu.commun.jp/tag/blog" rel="tag">Blog</a></li>
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/comment.gif" alt="" /><a href="http://ayu.commun.jp/2008/05/21/how-to-install-habari-in-a-sub-directory-japanese#comments" title="Comments to this post">0Comments</a></li>
        </ul>
        <div class="post-contents">
          <div class="socialink"><a href="mailto:?subject=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95&body=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese" target="_blank" title="Post to Email" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/email.png" width="16" height="16" alt="Post to Email" style="padding:0 3px;"></a><a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese" target="_blank" title="Post to Digg" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/digg.png" width="16" height="16" alt="Post to Digg" style="padding:0 3px;"></a><a href="http://delicious.com/save?url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese&title=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95&v=5&jump=yes" target="_blank" title="Post to delicious" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/delicious.png" width="16" height="16" alt="Post to delicious" style="padding:0 3px;"></a><a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese&title=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95','bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();" title="Post to Google" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/google.png" width="16" height="16" alt="Post to Google" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://b.hatena.ne.jp/add?mode=confirm&is_bm=1&title=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese','socialink','width=550,height=600,resizable=1,scrollbars=1');})();" title="Post to Hatena Bookmark" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/hatena.png" width="16" height="16" alt="Post to Hatena Bookmark" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95&u=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese&opener=bm&ei=UTF-8','socialink','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);})();" title="Post to Yahoo! JAPAN Bookmarks" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/yahoojbookmarks.png" width="16" height="16" alt="Post to Yahoo! JAPAN Bookmarks" style="padding:0 3px;"></a><a href="http://buzzurl.jp/entry/http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese" target="_blank" title="Post to Buzzurl" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/buzzurl.png" width="16" height="16" alt="Post to Buzzurl" style="padding:0 3px;"></a><a href="http://clip.livedoor.com/redirect?link=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory-japanese&title=One+Wish...+-+Habari%E3%82%92%E3%82%B5%E3%83%96%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95&ie=utf-8" target="_blank" title="Post to livedoor Clip" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/livedoorclip.png" width="16" height="16" alt="Post to livedoor Clip" style="padding:0 3px;"></a></div><p>Habariはルートディレクトリのファイル数が比較的少ない方ではあるのですがやっぱりルートディレクトリはなるべくファイルを減らしてすっきり整理したいものです。そこで以下のようにインストールすることでHabari本体をサブディレクトリに置いたままルートURLでアクセス出来るようになります。</p><ol>
<li>初めにHabariを通常通りサブディレクトリ(例: /habari/)にインストールします。</li>
<li>/index.php に以下の内容でファイルを作成します。<br>
<pre><code>
<?php
include('habari/index.php');
?>
</code></pre></li>
<li>/.htaccess に以下の内容でファイルを作成します。<br>
<pre><code>
RewriteEngine on
RewriteRule ^(system|3rdparty|scripts)/(.*)$ /habari/$1/$2 [L]
RewriteRule ^user/(themes|plugins|files)/(.*)$ /habari/user/$1/$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</code></pre></li>
</ol>        </div>
      </div>

            <div class="post" id="post-62">
        <h2><a href="http://ayu.commun.jp/2008/05/21/how-to-install-habari-in-a-sub-directory">How-to: install Habari in a sub-directory</a></h2>
        <ul class="post-meta">
          <li>May 21, 2008 11:22am</li>
<!--          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/icon_user.gif" alt="" />ayunyan</li> //-->
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/folder.gif" alt="" /><a href="http://ayu.commun.jp/tag/habari" rel="tag">Habari</a>, <a href="http://ayu.commun.jp/tag/blog" rel="tag">Blog</a> and <a href="http://ayu.commun.jp/tag/english" rel="tag">English</a></li>
          <li><img src="http://ayu.commun.jp/user/themes/onewish/img/comment.gif" alt="" /><a href="http://ayu.commun.jp/2008/05/21/how-to-install-habari-in-a-sub-directory#comments" title="Comments to this post">0Comments</a></li>
        </ul>
        <div class="post-contents">
          <div class="socialink"><a href="mailto:?subject=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory&body=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory" target="_blank" title="Post to Email" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/email.png" width="16" height="16" alt="Post to Email" style="padding:0 3px;"></a><a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory" target="_blank" title="Post to Digg" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/digg.png" width="16" height="16" alt="Post to Digg" style="padding:0 3px;"></a><a href="http://delicious.com/save?url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory&title=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory&v=5&jump=yes" target="_blank" title="Post to delicious" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/delicious.png" width="16" height="16" alt="Post to delicious" style="padding:0 3px;"></a><a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory&title=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory','bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();" title="Post to Google" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/google.png" width="16" height="16" alt="Post to Google" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://b.hatena.ne.jp/add?mode=confirm&is_bm=1&title=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory&url=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory','socialink','width=550,height=600,resizable=1,scrollbars=1');})();" title="Post to Hatena Bookmark" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/hatena.png" width="16" height="16" alt="Post to Hatena Bookmark" style="padding:0 3px;"></a><a href="javascript:(function(){window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory&u=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory&opener=bm&ei=UTF-8','socialink','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);})();" title="Post to Yahoo! JAPAN Bookmarks" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/yahoojbookmarks.png" width="16" height="16" alt="Post to Yahoo! JAPAN Bookmarks" style="padding:0 3px;"></a><a href="http://buzzurl.jp/entry/http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory" target="_blank" title="Post to Buzzurl" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/buzzurl.png" width="16" height="16" alt="Post to Buzzurl" style="padding:0 3px;"></a><a href="http://clip.livedoor.com/redirect?link=http%3A%2F%2Fayu.commun.jp%2F2008%2F05%2F21%2Fhow-to-install-habari-in-a-sub-directory&title=One+Wish...+-+How-to%3A+install+Habari+in+a+sub-directory&ie=utf-8" target="_blank" title="Post to livedoor Clip" rel="nofollow"><img src="http://ayu.commun.jp/user/plugins/socialink/img/icon/livedoorclip.png" width="16" height="16" alt="Post to livedoor Clip" style="padding:0 3px;"></a></div><p>I do not want for many files to be put on root directory. therefore, I installed Habari by the following methods.</p><ol>
<li>first, install Habari in the subdirectory (e.g. /habari/). </li>
<li>create /index.php file in your text editor and save the following line:<br>
<pre><code>
<?php
include('habari/index.php');
?>
</code></pre></li>
<li>create /.htaccess file in your text editor and save the following line:<br>
<pre><code>
RewriteEngine on
RewriteRule ^(system|3rdparty|scripts)/(.*)$ /habari/$1/$2 [L]
RewriteRule ^user/(themes|plugins|files)/(.*)$ /habari/user/$1/$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</code></pre></li>
</ol>        </div>
      </div>

      
      <div class="navigation">
          <a href="http://ayu.commun.jp/tag/habari/page/1" class="current-page">1</a> <a href="http://ayu.commun.jp/tag/habari/page/2" >2</a> <a href="http://ayu.commun.jp/tag/habari/page/3" >3</a> <a class="next-page" href="http://ayu.commun.jp/tag/habari/page/2" title="Next »">Next »</a>      </div>
    </div>

        <div id="sidebar">
      <div class="sidebox">
        <div class="sidebox-title">About...</div>
        <div class="sidebox-content">
          <p>ayunyan<br />
          プリンが主食なちびっ子</p>
          <p>
            <a href="http://twitter.com/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/twitter.png" alt="Twitter" /></a>
            <a href="http://friendfeed.com/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/friendfeed.png" alt="FriendFeed" /></a>
            <a href="http://ayunyan.jaiku.com/"><img src="http://ayu.commun.jp/user/themes/onewish/img/jaiku.png" alt="Jaiku" /></a>
            <a href="http://identi.ca/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/identica.png" alt="Identi.ca" /></a>
            <a href="http://www.flickr.com/photos/ayunyan/"><img src="http://ayu.commun.jp/user/themes/onewish/img/flickr.png" alt="Flickr" /></a>
            <a href="http://delicious.com/ayunya"><img src="http://ayu.commun.jp/user/themes/onewish/img/delicious.png" alt="delicious" /></a>
            <a href="http://www.iknow.co.jp/user/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/iknow.png" alt="iKnow!" /></a>
            <a href="http://steamcommunity.com/id/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/steam.png" alt="Steam Community" /></a>
            <a href="http://www.ohloh.net/accounts/ayunyan"><img src="http://ayu.commun.jp/user/themes/onewish/img/ohloh.png" alt="Ohloh" /></a>
          </p>
          <p><img style="border: medium none; padding: 0pt 2px 0pt 0pt;" src="http://www.google.com/talk/service/resources/chaticon.gif" alt="" width="16" height="14"><img style="border: medium none ; padding: 0pt 2px 0pt 0pt;" src="http://www.google.com/talk/service/badge/Show?tk=z01q6amlq4tho6vjd1tocjakeam6rakcq39bdng8iqsd8jhpf94i4ut0jviqqukv7krmcvkltugtusi20vaj3qv7oeplg0fd8marulcoopggs16uubhlj54ajnldb5la7a9qmejau7olchrg&w=9&h=9" alt="" width="9" height="9" /><a href="http://www.google.com/talk/service/badge/Start?tk=z01q6amlq4tho6vjd1tocjakeam6rakcq39bdng8iqsd8jhpf94i4ut0jviqqukv7krmcvkltugtusi20vaj3qv7oeplg0fd8marulcoopggs16uubhlj54ajnldb5la7a9qmejau7olchrg" target="_blank" title="Click here to chat with ayunyan">Chat with ayunyan</a></p>
        </div>
      </div>

      <div class="sidebox">
        <div class="sidebox-title">Recent Posts</div>
        <div class="sidebox-content">
          <ul>
                        <li><a href="http://ayu.commun.jp/2009/02/24/ipod-touch-apps">iPod touchにいれたアプリ</a></li>
                        <li><a href="http://ayu.commun.jp/2009/02/13/japan-microblogging-service-share">国内ミニブログ/マイクロブログサービスのシェア</a></li>
                        <li><a href="http://ayu.commun.jp/2009/01/21/twiple-tweetback">Twiple! Tweetback</a></li>
                        <li><a href="http://ayu.commun.jp/2008/12/16/twiple-beta-released">Twiple! (beta) をリリースしました。</a></li>
                        <li><a href="http://ayu.commun.jp/2008/12/03/nekonekomovie-nyankoclassic">ねこねこ動画: ニャンコが歌うクラシック</a></li>
                        <li><a href="http://ayu.commun.jp/2008/11/30/nekonekomovie-whac-a-mole">ねこねこ動画: ネズミ(もぐら)叩き</a></li>
                        <li><a href="http://ayu.commun.jp/2008/11/25/ellaunch-024">Firefox Extension: elLaunch Ver 0.24</a></li>
                        <li><a href="http://ayu.commun.jp/2008/11/23/nekonekomovie-roomba-driver">ねこねこ動画: 掃除機の運転手さん</a></li>
                        <li><a href="http://ayu.commun.jp/2008/11/15/nekonekomovie-bigmiffy">ねこねこ動画: 巨大ミッフィー</a></li>
                        <li><a href="http://ayu.commun.jp/2008/11/10/nekonekomovie-humihumi">ねこねこ動画: ふみふみ</a></li>
                      </ul>
        </div>
      </div>

      <div class="sidebox">
        <div class="sidebox-title">Recent Comments</div>
        <div class="sidebox-content">
          <ul>
                        <li><a href="http://cecube.de/">Chris</a> on <a href="http://ayu.commun.jp/habari-rateit">Rate It!</a></li>
                        <li><a href="">sten</a> on <a href="http://ayu.commun.jp/habari-rateit">Rate It!</a></li>
                        <li><a href="http://www.odysseygate.com/">??</a> on <a href="http://ayu.commun.jp/2009/02/13/japan-microblogging-service-share">国内ミニブログ/マイクロブログサービスのシェア</a></li>
                        <li><a href="">foxconn</a> on <a href="http://ayu.commun.jp/2008/05/30/howto-etqw-tv">ET:QW TVの設定方法</a></li>
                        <li><a href="http://gopherwood.info/">wayne</a> on <a href="http://ayu.commun.jp/2008/05/23/amazon-socialink-fckeditor-rate-it-habari-plugins-released">Amazon/Socialink/FCKeditor/Rate It!  Habari Plugins released!</a></li>
                        <li><a href="">ayu</a> on <a href="http://ayu.commun.jp/2008/04/25/dancing-kittens">首振り猫ちゃんず</a></li>
                        <li><a href="">uno</a> on <a href="http://ayu.commun.jp/2008/04/25/dancing-kittens">首振り猫ちゃんず</a></li>
                        <li><a href="http://kmd-home.ddo.jp/">KAMADA</a> on <a href="http://ayu.commun.jp/2006/10/01/vanilla-2">Vanillaの日本語化</a></li>
                        <li><a href="">Salo_Papa_KTS</a> on <a href="http://ayu.commun.jp/2006/10/21/lunch">昼食</a></li>
                        <li><a href="">Bluevery</a> on <a href="http://ayu.commun.jp/2006/10/21/lunch">昼食</a></li>
                      </ul>
        </div>
      </div>

      <div class="sidebox">
        <div class="sidebox-title">Search</div>
        <div class="sidebox-content">
          <form method="get" id="searchform" name="searchform" action="http://ayu.commun.jp/search">
<div><input type="text" value="" name="criteria" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
        </div>
      </div>

      
     <div id="ipv6_enabled_www_test_logo"></div>
<script language="JavaScript" type="text/javascript">
    	var Ipv6_Js_Server = (("https:" == document.location.protocol) ? "https://" : "http://");
	document.write(unescape("%3Cscript src='" + Ipv6_Js_Server + "www.ipv6forum.com/ipv6_enabled/sa/SA1.php?id=395' type='text/javascript'%3E%3C/script%3E"));
</script>
    </div>

    <br style="clear: both;" />

  </div>
  <div id="footcontainer">
    <div id="footer">
      Copyright (c) <a href="http://ayu.commun.jp/">ayu</a> All Rights Reserved. Powered by <a href="http://habariproject.org/">Habari 0.7-alpha.</a>
    </div>
  </div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3945960-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>