Monday, October 26, 2009

Re: Custom route stop working without trailing '/'

Router::connect('/admin/*', array('controller' => 'admins',
'action'
=> 'dashboard', 'admin'));

On Oct 26, 1:26 am, Jesh <jesh...@gmail.com> wrote:
> Just setup a custom route for users controller as below:
>
> Router::connect('/admin',    array('controller' => 'admins', 'action'
> => 'dashboard', 'admin'));
>
> The cakphp router will work property if i enter the url as '/admin/'
> or '/member/'. But if without the trailing '/', the cakephp is looking
> for a controller named "admin" with action "index", as a result,
> missing controller error is thrown.
>
> Any Idea to make cakephp will route to the expected controller, in my
> case is "admins", with and without the trailing '/'.
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: