is CodeIgniter a good choice for Multi-site ? |
Hi codeIgniter's community,
I wanna use codeIgniter for developing a new project. ![]() But I'm wondering if codeIgniter will be so useful to manage Multi-site. ![]() I mean : Same data base + same View ---> www.name1.com Same data base & same View ---> wwww.name2.com is it possible ? can you guide me how plz ? ![]() Thanks a lot.
I quickly understood but it takes a long time to explain to me
![]() ![]()
What do you want to do? Do you need 2 different URL's that are in fact eachother's aliasses? Or are you planning to build two different websites (with different controllers etc.) that just share the same database and views?
So please, explain a little bit more. (08-12-2015, 03:42 AM)Wouter60 Wrote: What do you want to do? Do you need 2 different URL's that are in fact eachother's aliasses? Or are you planning to build two different websites (with different controllers etc.) that just share the same database and views? Thank you so much for your answer. Acually, I wanna use the same code to generate differents contents . and using different URL for accessing to each content. for exemple : www.mysite.com/contentA <-- I wanna buy a new domaine for it, so it will be : www.contentA.com got it ? (sorry for my bad English ![]()
I quickly understood but it takes a long time to explain to me
![]() ![]()
First of all, it is very easy to make two different websites use the same database. CI has a file named application/config/database.php. You can setup multiple configurations, or two CI-installations can both refer to the same database.
Keep in mind that some hosting providers only allow access to databases from URL's on their own environment. When both your URL's are hosted by the same provider, you don't have a problem. Next question is: can you use one CI-installation to manage two different websites? It depends. If both URL's are on the same hosting environment, they probably have their own folder inside the webspace that your provider has given you. It is possible to put your CI-installation on the same level, rather than inside each website's folder. Code: toplevel folder To present different content to your users, depending on the url they are using, you must check the url in all your controllers. Hope this will help you. ![]()
Your answer helped me a lot, Thanks a lot
![]()
I quickly understood but it takes a long time to explain to me
![]() ![]()
I have done customize for CI to handle multiple sites like this
/application/sites/ -------------------/siteone.com -------------------/sitetwo.com ------------------/sitethree.net -----------------/site{n}.com each of site has It own configuration, database and customize view (template), so Yes, CI can complete your situation well. (08-22-2015, 10:14 AM)phplaw Wrote: I have done customize for CI to handle multiple sites like this I got your point ... it's so intersting, Thank you so much ![]()
I quickly understood but it takes a long time to explain to me
![]() ![]() (08-22-2015, 10:14 AM)phplaw Wrote: I have done customize for CI to handle multiple sites like this Looks good
Musheer
http://codesok.com |
Welcome Guest, Not a member yet? Register Sign In |