One yii application to handle requests for multiple domains

Hi!

I have multiple domains (e.g. domain1.com, domain2.com, and maindomain.com with SSL etc.) on one server (IP address) and I would like to use one Yii application for handlig requests onto all those domains. The problem is, that some domain names are especially good to raise visibility on search engines and one other domain name administratively has some priority and SSL is added for it. So - I would like allow user to go through one domain pages and if he or she has decided to make some actions that require ssl (like logging, making payment and so on), the he or she can be forwarded to domain with assigned ssl. Is that possible?

I guess that this can required no more than mapping domain names / URLs to actions, but where to do this - in Yii, or in Apache?

I’m also interested in this. I guess the idea is to map domains/subdomains in apache towards different directories in the protected directory of Yii. But not sure how to make Yii suport this.