You could try using a custom route class:

http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp

http://cakedc.com/eng/pierre_martin/2010/08/05/i18n-routes-with-cakephp-1-3

On Aug 31, 10:27 am, cricket <[email protected]> wrote:
> 2010/8/30 Harald Martin Bråttbåkk <[email protected]>:
>
> > Hello,
>
> > i simply want to change the default routing pattern "http://
> > example.com/controller/action/param1/param2/param3" into "http://
> > example.com/param1/controller/action/param2/param3". Is there a simple
> > way to do this?
>
> I'm not sure about doing it with generic controller and action. Also,
> the regular expressions necessary will depend on what the params are
> expected to be. For example, if you wanted URLs like so:
>
> http://www.whatever.com/en/catalogs/some_string123/456
>
> Router::connect(
>         '/:param1/catalogs/:param2/:param3',
>         array(
>                 'controller' => 'catalogs',
>                 'action' => 'view'
>         ),
>         array(
>                 'param1' => '[a-z]{2}',
>                 'param2' => '[_a-z0-9]+',
>                 'param3' => '[0-9]+'
>                 'pass' => array(
>                         'param1', 'param2', 'param3'
>                 )
>         )
> );
>
> function view($param1, $param2, $param3) { ... }

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to