Welcome Guest, Not a member yet? Register   Sign In
Multiple domains pointing to same CI application
#9

[eluser]jadebot[/eluser]
First off I'd recommend running all your sites from one engine. Don't clone your code if you don't have to, it will just be a big mess. Just because you run them off the same engine does not mean you can't dynamically skin them with css etc, so there's very little reason to run multiple instances.

Have a look at the solution to my problem here: http://ellislab.com/forums/viewthread/95977/#485679
My problem is actually a lot harder than yours, so I'll let you know my thoughts on accomplishing what you want.

What I would do is create a pre_system hook.
In this function you can fetch the $_SERVER[‘SERVER_NAME’];
and use a switch statement to define different credentials for different databases, based on the server_name variable.

Then you just dynamically create the database.php config file using these new credentials.
If you look at my thread, what I did had a lot more steps, but you want is much simpler.

Hope this helps.


Messages In This Thread
Multiple domains pointing to same CI application - by El Forum - 12-05-2008, 09:30 PM
Multiple domains pointing to same CI application - by El Forum - 12-07-2008, 09:57 AM
Multiple domains pointing to same CI application - by El Forum - 12-07-2008, 10:15 AM
Multiple domains pointing to same CI application - by El Forum - 12-07-2008, 11:00 AM
Multiple domains pointing to same CI application - by El Forum - 12-07-2008, 03:56 PM
Multiple domains pointing to same CI application - by El Forum - 12-08-2008, 06:42 AM
Multiple domains pointing to same CI application - by El Forum - 12-08-2008, 05:07 PM
Multiple domains pointing to same CI application - by El Forum - 12-08-2008, 05:35 PM
Multiple domains pointing to same CI application - by El Forum - 12-08-2008, 05:55 PM
Multiple domains pointing to same CI application - by El Forum - 12-09-2008, 02:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB