Ubuntu の Apache で FatFree フレームワークを使用してアプリケーションを開発しましたが、問題なく動作していました。私は仮想ホスト構成を使用しておらず、index.php はサーバーのルートにありました。
今、仮想ホストを作成しました。新しいプロジェクトでも作業したいので、前のプロジェクトをサーバー ルートのサブフォルダーに移動しました。仮想ホストの構成を正しく行いました。
問題 -
index.php に多くのルートが定義されています。ホーム ルートF3::route('GET /', 'Main->front_page')
は正しくマッピングされているため、最初のページは正常に表示されます。ただし、それ以外のルートは一致しません。具体的には、500 エラーが発生するルートF3::route('GET /captcha', 'Main->security_code')
があります。
Apache エラー ログのエラーのログは次のとおりです。
[Thu Aug 16 12:48:49 2012] [error] [client 127.0.0.1] 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.
[Thu Aug 16 12:48:49 2012] [debug] core.c(3112): [client 127.0.0.1] r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /captcha
[Thu Aug 16 12:48:49 2012] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 624 to 382 : URL /oresoft/index.php
ここで何か不足していますか?あるルートが一致し、他のルートが一致しないのはなぜですか?
以下は、と同じフォルダーにindex.php
あり、のサブフォルダーにある私の.htaccessファイル/oresoft
です/var/www
。
RewriteEngine On
RewriteBase /oresoft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
これは、以前に持っていたものと同じ htaccess ファイルです。これをサブフォルダーに移動し、RewriteBase
.