I’ve got a reasonable grasp of the CUrlManager component, but I don’t know how to interact with subdomains - I’ve never used them before. Can I even create them dynamically?
Since 1.0.11 you can use parameterized host names in your url rules. They need to start with ‘http://’ or ‘https://’. So for your case a rule like this should work:
For better safety you should supply the list of available controller/action Ids in the rules i think. If you don’t care you could also use <_c:\w+> and <_a:\w+> in the pattern.