Hi. I meet kohana 3. I would like to know the answer to my question. In general, there are 4 url that I would like to handle one router. Namely:
/ news /
/ news/11-02-2009 /
/ news / butik /
/ news/butik/11-02-2009 /
Where date 11/02/2009 News. Can be any correct date. A butik a string [a-zA-Z_] +
I made such a router:
Route:: set ( 'news',' news (/ (<date>) ((<butik>) (<butik> / <date> )))', array (
'date' => '[0-3] [0-9] - [0-1] [0-9] -20 [0-9] [0-9]',
'butik' => '[a-zA-Z] +'
))
-> defaults (array (
'controller' => 'news',
'action' => 'show',
'date' =>'',
'butik' =>''
));
and received an error ErrorException [Warning]: preg_match () [function.preg-match]: Compilation failed: two named subpatterns have the same name at offset 98
I understand that you can make two rules for the router. But I would like one. This is something perhaps?