Sub-domains with different databases in Yii!

Comparing #2 with #3

Revision #3 was created by jwerd jwerd on Jun 2, 2011, 5:07:15 AM.

broke link

Content

[...]
I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files to do so. So the only thing that differs between my clients portals is in fact the database connection.

So let's get started:

I have a project where I give each client access to a their "portal" via say: <a href="http://client1.simpledentalapp.com
.com" title="example">client1.simpledentalapp.com</a> and one thing about is it they each need a separate database for security.


-----
The set up
-----
[...]