Groups
Groups
Sign in
Groups
Groups
日本Symfonyユーザー会
Conversations
About
Send feedback
Help
(symfony 1.4) redirect()で、フロントコントローラが無視されてしまう現象
239 views
Skip to first unread message
rikimaru_gabber
unread,
May 22, 2012, 8:48:02 PM
5/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Symfonyユーザー会
いつもお世話になっております。
芳賀と申します。
アクション内で、redirect('モジュール名/アクション名')を実行したら、
フロントコントローラが無視されて、Apahceで「Object not found」
というエラーが発生します。
つまり、URLが下記のように変わってしまう現象が見られました。
(http省略)localhost/frontend_dev.php/(モジュール名)/(アクション名A)
↓
(http省略)localhost/(モジュール名)/(アクション名B)
YAMLでの「/(モジュール名)/(アクション名)」の設定は問題なく、
htaccessで、RewriteBaseなどの設定は、マニュアル・チュートリアル
通りの設定になっていることを確認しました。
redirect先はフルパスで行うべきということでしょうか?
もし、似たようなご経験のある方がいらっしゃいましたら、
お知恵を拝借したく、よろしくお願いいたします。
Haga Toshinobu
unread,
May 23, 2012, 11:54:46 AM
5/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Symfonyユーザー会
申し訳ございません。
自己解決しました。
原因はsetting.ymlで「prod」「dev」とも「no_script_name: true」になってました。7
http://www.symfony-project.org/reference/1_4/ja/04-Settings#chapter_04_sub_no_script_name
先日の「複数アプリケーション環境」に関連した内容でしたが、
webの下にアプリケーションごとのフォルダを設けて、それぞれの
フロントコントローラに振り分けて、htacessをコピーして配置させて
解決しました。
ご迷惑をおかけいたしました。
ありがとうございました。
Reply all
Reply to author
Forward
0 new messages