Welcome Guest, Not a member yet? Register   Sign In
is CodeIgniter a good choice for Multi-site ?
#1

Hi codeIgniter's community,

I wanna use codeIgniter for developing a new project.  Smile
But I'm wondering if codeIgniter will be so useful to manage Multi-site.   Huh

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 ?  Idea

Thanks a lot.
I quickly understood but it takes a long time to explain to me Wink Idea
Reply
#2

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.
Reply
#3

(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?
So please, explain a little bit more.

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  Undecided
I quickly understood but it takes a long time to explain to me Wink Idea
Reply
#4

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
- codeigniter
- contentA
- contentB
In the index.php file of your contentA website, point the $system_path and $application_folder to the right position. You do the same for your contentB website. For more information: http://www.codeigniter.com/userguide3/in...index.html
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.  Smile
Reply
#5

Your answer helped me a lot, Thanks a lot Smile
I quickly understood but it takes a long time to explain to me Wink Idea
Reply
#6

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.
Reply
#7

(08-22-2015, 10:14 AM)phplaw Wrote: 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.

I got your point ... it's so intersting, Thank you so much  Idea
I quickly understood but it takes a long time to explain to me Wink Idea
Reply
#8

(08-22-2015, 10:14 AM)phplaw Wrote: 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.

Looks good
Reply




Theme © iAndrew 2016 - Forum software by © MyBB