FuelPHPのルーター(app/config/routes.php)の設定の問題のような気がしますが違いますでしょうか?
適切なURLアクセス
は ルーティング処理(ルーター設定)で行います。
php
1// app/config/routes.php
2return array(
3 'information/shop_recruit' => 'コントローラー名/アクション名',
4 ...
通常は下記のようにルーターに正規表現が書けます。
php
1// app/config/routes.php
2array(
3 'information/shop_recruit/[\w]+' => 'test1/index',
4 'information/shop_recruit/(?P<cap>[0-9]{1,4})' => 'test1/capture',
5 ...
php
1// app/classes/controller/test1.php
2class Controller_Test1
3{
4 public function action_index ()
5 {
6 ...
7 }
8
9 public function action_capture ()
10 {
11 $params = $this->param('cap');
12 ...
13 }
14}
URLのパターンが非常に複雑な場合はコントローラー内にカスタムルーターメソッド(Controller::router()
)を書く必要があります。
ルーティング処理を共通化させたい場合は、基底クラスを作成してプロジェクト内の全コントローラーで読み込みます。
php
1// app/classes/controller/test1.php
2class Controller_Test1
3{
4 public function router ($resource, $arguments)
5 {
6 // ここでフォワードや、リダイレクトなどを行う。
7 // ...
8 // 通常ルーティング
9 return parent::router($resource, $arguments);
10 }
11}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。