I have the follow (and unique) routing rule:
Router::connect(
'/*',
array(
'controller' => 'dispatch',
'action' => 'index'
)
);
Which send all request to DispatchController::index()
which is responsive to parse and "re-route" de request, like a dynamic routing. When I access /sample-page/debug
and do a debug into $this->request
, the follow is the output I receive:
object(CakeRequest) {
params => array(
'plugin' => null,
'controller' => 'dispatch',
'action' => 'index',
'named' => array(),
'pass' => array(
(int) 0 => 'sample-page',
(int) 1 => 'edit'
)
)
[...]
}
I want to receive from request the correct values:
object(CakeRequest) {
params => array(
'plugin' => null,
'controller' => 'sample-page',
'action' => 'edit',
'named' => array(),
'pass' => array()
)
[...]
}
I have tried without success:
Router::connect(
'/:controller/:action/*',
array(
'controller' => 'dispatch',
'action' => 'index'
)
);