Hi Eric,
Thanks for that pointer to the other thread. Adding "/content" to the
beginning of my route did indeed fix the problem, but to me it feels
like a hack.
My two main routes now look like this:
Router::connect('/content/:lang/:controller/*', null,
array('lang'=>'en|it', 'controller'=>'articles|comments|tags'));
Router::connect('/*', array('controller' => 'pages', 'action' =>
'display'));
which results in my static pages having urls that look like /en/about,
which is what I'm going for, but all the rest of the urls look like /
content/en/controller/action which is not exactly ideal.
The problem with the Router seems to be that if you have more than one
wildcard in a route and the first one is matched, the Router thinks
that it has found the route that it needs to work with and so you get
missing controller or missing view errors when the rest of the route
doesn't match up, even though the url would match one of the
subsequent routes. What this effectively means is that you can't have
two routes that start with the same wildcard because the first one
will always be used, no matter what.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---