Welcome Guest, Not a member yet? Register   Sign In
One CI install, One admin section, multiple sites?
#2

[eluser]dchuk[/eluser]
I'm building the exact same thing. It's actually not too hard. I have set up my base_url to be whatever the domain is that is calling the app (the code is floating around here, it's what people use to upload their site to their servers without having to change any config info). Then, I have a set of controllers for the admin part and a set for the public side. In routing, I have a conditional check run, and if the domain calling the app is my admin domain, it routes to the protected admin area. Otherwise, it routes to the public controllers. Once there, the public controllers do a lookup to find out if the app has a site for that domain, and then responds with the data for that domain.

By having a domains table, you can then assign a domain_id to every single item in your database, making it really easy to only load up data for your specific domain.

Other than that, you just need to park your domains on your server. I have found code to use the NameCheap api to purchase the domains and a CPanel api to park the domains, so you can actually do everything from right inside your app if you want.


Messages In This Thread
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 11:51 AM
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 02:37 PM
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 03:07 PM
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 03:28 PM
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 03:34 PM
One CI install, One admin section, multiple sites? - by El Forum - 01-05-2010, 06:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB