Hi,
I have these rules for the urlManager in config/main.php:
'<view:about>'=>'site/page',
'<controller:projector>/\*<areas:[^\d].*>'=>'projector/view', // NOTE ESPECIALLY THIS ONE
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<action:contact>'=>'site/contact',
All rules work as expected in url parsing, and all except the highlighted one work as expected in url creation.
I don’t understand why.
For example, the url "/projector/*foo,bar" is parsed as expected, as "/projector/view?areas=foo,bar".
So, if I call
CHtml::normalizeUrl(array('projector/view', 'areas'=>'foo,bar'))
I would expect to get "/projector/*foo%2Cbar", but instead I get "/projector/view?areas=foo%2Cbar".
It looks like that rule is ignored when creating urls, though it works just fine when parsing them.
Why??
Thanks
m.