Url Rule Not Working For Createurl()

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.

Can you remove \* from the rule and see if it works.

It doesn’t. I still get /projector/view?areas=foo%2Cbar

Also, that would prevent me from calling any action of the Projector controller other than ‘view’.