I have noticed a strange behavior in CUrlManager.
I have an application in a subfolder:
localhost/vm
And a parametrized rule for an action, let say contact:
"http://<domain:[\w_]+>.localhost/<a:[\w]+>"=>'premium/<a>',
Wich correcly parse the url http://zaccaria.localhost/vm/contact to premium/contact, that’s great.
The problem is that this rule generate the following url:
http://zaccaria.localhost/contact
WITHOUT the base url vm.
I think that the operations of parsing/creating url should be perfectly reversable, so if a url is parsed in some way, it is expectable that the url created by the same url is the original.
The problem in this asymetry is that the rule with baseUrl:
"http://<domain:[\w_]+>.localhost/vm/<a:[\w]+>"=>'premium/<a>',
Correctly create the url, but can’t parse (and is not that nice to hardcode the base url…).
The solution I found is the following:
"http://<domain:[\w_]+>.localhost/<a:[\w]+>"=>array('premium/<a>', 'parsingOnly'=>true),
"http://<domain:[\w_]+>.localhost/vm/<a:[\w]+>"=>'premium/<a>',
Wich is nothing more than a workaround. Will the staff fix this problem? Any of the rule can be a valid solution, (better the one without baseUrl), but the point is that I’d like a simmetrical behavior, I mean that the craeted url should be the same as the parsded one