An Application With An Unique Domain And Different Databases

Greetings.

I want to develop an application with an unique domain and different databases for different clients.

My idea is the next:

h ttp://www.mydomain.com/client1/bill/show/1

h ttp://www.mydomain.com/client2/bill/show/1

In the first case, Yii must access to b1 database and in the second case, Yii must access to b2 database.

The structure of b1 and b2 are identical but the data contained is different.

Is there any way to make this with Yii? Perhaps with url management?

Thanks

What’s limiting you on having different apps for each client?

Otherway, you can just copy your ‘db’ component in config/main.php and put ‘db2’ instead, adding a ‘class’ parameter to specify the use of CDbconnection