Hello all,

I am trying to code an app for a music festival. There are websites
for a few years, which all follow the following convention :

www.mysite.com/year (for example, this year's website should link to
www.mysite.com/2009)

As the models and controllers for all years are more or less the same
(only the views change), I thought that I should use the routing
mechanism to get to the right controller :

basically, www.mysite.com/2009/bands/view/1 should actually reroute to
www.mysite.com/bands/view/1.

Here is the routing rule I wrote :

Router::connect('/:year/:controller/:action/:thing',
      array('thing' => null),
      array('year' => '200[6-9]','thing' => '[0-9]+')
 );

The problem is that if I try getting to www.mysite.com/2009/bands/view/1,
I am told that the id is null. What am I doing wrong here ?

Thank you,
ojonam

--~--~---------~--~----~------------~-------~--~----~
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