Hi all,
I'm trying to setup a custom route that allows me to serve content
based on a customer's unique ID in the URL...
http://example.com/c-<customer-id>/<action>
I have setup this in the routes.php as follows...
Router::connect('/c-:clientId/:action/*',
array(
'controller' => 'clients',
'action' => 'index'),
array(
'pass' => array('clientId'),
'clientId' => '[0-9]+'
)
);
I based this on the example in the manual...
Router::connect(
'/cooks/:action/*', array('controller' => 'users', 'action' =>
'index')
);
However, when I don't include an action in the URL I get the error
that the controller C-<cient-id> does not exist.
Can anyone advise why my default action (index) is not used when no
other action is given?
Thanks in advance,
T
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php