Url Rule Not Working For Createurl()


I have these rules for the urlManager in config/main.php:


'<controller:projector>/\*<areas:[^\d].*>'=>'projector/view', // NOTE ESPECIALLY THIS ONE





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.




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’.