サブディレクトリにcakePHPを構築する

もしサブドメインに構築する場合には、.htaccessの設定に追記が必要となる。
具体的には、RewriteBaseをきちんと設定にあるような
app/webroot/.htaccess にあるmod_rewriteの設定において
RewriteBase /(サブディレクトリ名)
を追加する必要がある。
もし、追加し忘れると、500 Internal Server Errorが表示され、Apacheのログには、
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.
というメッセージが記録される。
今までDocumentRoot上にしか構築したことがなかったので、少しハマってしまった。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です