CodeIgniter Forums
Several Domains, Different Data, One Database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Several Domains, Different Data, One Database (/thread-10796.html)



Several Domains, Different Data, One Database - El Forum - 08-12-2008

[eluser]Jay Logan[/eluser]
Can it be done? My job has about 150+ domains and all they do is redirect to folders on our main web site. I want to try and utilize the keywords in them and maybe help us out with search engine results. Obviously, I don't want to make 150 different web sites. What I would like to do is create an index file that retrieves information from the DB based on the URL. I would think that I would need different cPanel accounts just to make the domains "real" in the eyes of search engines. But other than that, I'm lost. I want to try and use CI if I can but if it's overkill, forget about it. The server is a reseller cPanel account so I have limited access. Please help if you can.


Several Domains, Different Data, One Database - El Forum - 08-13-2008

[eluser]eilrahc[/eluser]
If I understand what you're saying, yes you should be able to do that without any special programming. CPanel has a concept called addon domains where the document root for each domain that you add on is a subdirectory of the main account. So if your main domain is example.com and the document root is /home/example/public_html, you'd go into the CPanel for example.com and create an addon domain for example2.com and its document root would be /home/example/public_html/example2. I believe you can set the addon domains' document root to anything so if you want all of them to have the same content, just set the document root to the same directory for all of them.

Since it's a reseller account, you may or may not have a limit on the number of addon domains you can create under the main account, though.

If you have any questions about this, it's really best to call up your hosting provider since they will be better able to answer this question. (Otherwise, they're not worth whatever you're paying them. Tongue) You can also try the CPanel forums at cpanel.net.


Several Domains, Different Data, One Database - El Forum - 08-13-2008

[eluser]Jay Logan[/eluser]
I saw that feature but I thought it only redirected to the sub folder. Meaning if I go to example2.com it would just redirect and show example1.com/example2/ in the browser. I will look further into this. Thanks!