2012-04-30 16 views
3

私は今晩zendをセットアップしました。デフォルトのインデックスページは動作します(http://home.mitheren.com/399a4/public/)。私はその後、そのコントローラで新しいActionを追加しようとしましたが、私は404エラーを受け取り続けます。Zend書き換えルールが機能していません

これは、パブリック/ディレクトリのための私の.htaccessファイルです:

RewriteEngine On 
RewriteBase /399a4/public 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 

私はページ(http://home.mitheren.com/399a4/public/index/testing)にアクセスしようとすると、私は404エラーとは/ var/log/apache2の/で、次のメッセージが表示されますerror.logファイル:

[Mon Apr 30 21:44:30 2012] [error] [client 192.168.1.254] File does not exist: /var/www/399a4/public/index.php/testing 

私も書き換えロギングを試みたが、そのページにアクセスするには、次のエントリを取得しました:

192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9e6020/subreq] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9e6020/subreq] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9e6020/subreq] (3) [perdir /var/www/399a4/public/] applying pattern '^.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9e6020/subreq] (4) [perdir /var/www/399a4/public/] RewriteCond: input='/var/www/399a4/public/index.php' pattern='-s' => matched 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9e6020/subreq] (1) [perdir /var/www/399a4/public/] pass through /var/www/399a4/public/index.php 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9cdf80/initial] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9cdf80/initial] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9cdf80/initial] (3) [perdir /var/www/399a4/public/] applying pattern '^.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9cdf80/initial] (4) [perdir /var/www/399a4/public/] RewriteCond: input='/var/www/399a4/public/index.php' pattern='-s' => matched< 
192.168.1.254 - - [30/Apr/2012:21:46:54 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9cdf80/initial] (1) [perdir /var/www/399a4/public/] pass through /var/www/399a4/public/index.php 

.htaccessファイルが確実に処理されています(AllowOverrideがオンになっており、変数を追加してPHP情報をチェックして確認しました)。

UPDATE:何ヴィータウタスが提案することは私に書き換えログにこの出力を与えるにルールを変更する:

192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] applying pattern '^/399a4/public/.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (3) [perdir /var/www/399a4/public/] applying pattern '^/399a4/public/.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ddff0/subreq] (1) [perdir /var/www/399a4/public/] pass through /var/www/399a4/public/index.php 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] applying pattern '^/399a4/public/.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] add path info postfix: /var/www/399a4/public/index.php -> /var/www/399a4/public/index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] strip per-dir prefix: /var/www/399a4/public/index.php/testing -> index.php/testing 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (3) [perdir /var/www/399a4/public/] applying pattern '^/399a4/public/.*$' to uri 'index.php/testing' 
192.168.1.254 - - [30/Apr/2012:21:59:14 +1000] [home.mitheren.com/sid#7f1ffd754120][rid#7f1ffd9ec050/initial] (1) [perdir /var/www/399a4/public/] pass through /var/www/399a4/public/index.php 


アップデート2:テストの目的のために、私は(http://home.mitheren.com/399a4/public/test)、(テストと呼ばれる)別のコントローラを追加しました完璧に動作します。これは、少なくとも私の書き換えルールは仕事の一種であることを意味しますか?

更新3:ソート済み! 私は2番目のテストコントローラでより多くのビューを作成しました。私はIndexControllerのリダイレクトに問題があるようです。私はこれが本当の問題か私の問題かどうかはわかりませんが、今のところそれができます。他の誰かがもっと情報を持っているなら、私はそれを聞きたいですが、これは私の仕事を終わらせるために行うべきです。

+0

仮想ホストを設定してみてください。 –

答えて

0

ソート済みです。私は2番目のテストコントローラでより多くのビューを作成し、それらはすべて正常に動作します。私はIndexControllerのリダイレクトに問題があるようです。

これが実際の問題か私の問題であるかどうかはわかりませんが、今のところそれができます。他の誰かがもっと情報を持っているなら、私はそれを聞きたいですが、これは私の仕事を終わらせるために行うべきです。

関連する問題