cakephpで「404 Not Found」になってしまう件

最近cakephpを試しています。

で、ちょっとはまってしまったのでメモしておきます。
http://gihyo.jp/tb?p=dev/serial/01/cakephp/0004
を参考に設置して試したのですが。
なぜか?

Not Found

The requested URL /home/hogehoge/public_html/cake/app/webroot/index.php was not found on this server.
Apache/2.2.6 (Fedora) Server at fuga Port 80

となってしまいます。

原因はmod_rewriteの設定だった

cakephp mod_rewrite」でググッってみると
以下のブログを発見

/ に置かれる事を前提にした mod_rewrite の設定になっているのでそこを手直ししてあげるだけ。

RewriteBaseを設定すると解決するらしい

上記のブログを参考に、
以下の3つのディレクトリにある.htaccsessにRewriteBaseの設定をしたらよくなりました。

  1. CakePHPのルートディレクト
  2. app ディレクト
  3. app/webroot ディレクト