?
Solved

Multiple CodeIgniter websites within a single domain

Posted on 2014-03-19
2
Medium Priority
?
2,048 Views
Last Modified: 2014-04-06
I am using CodeIgniter framework and I am wondering whether it is possible for me to setup multiple websites within a single domain.  For example, is it possible to achieve something like this:

http://test1.mydomain.com
http://test2.mydomain.com
http://test3.mydomain.com

I would like to have three separate CodeIgniter installations, each operating independently within these three sites, test1, test2 and test3.  Is this possible?  How can I achieve this?

Thanks.
0
Comment
Question by:DanielAttard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 2000 total points
ID: 39940140
Yes it's possible.

If all three subdomains are served from the same shared hosting and each subdomain points to a different folder, then you can put the codeigniter 'system' folder 1 level up from public_html and then have a separate application folder for each sub-domain - again 1 level up from public_html. Each sub domain folder would then just contain an index.php file along with the relevant public-facing bits, such as css, images, js etc. Your folder structure may look something like

/system
/app1
/app2
/app3
/public_html
   /app1_folder
      index.php
      /css
      /js
   /app2_folder
      index.php
      /css
      /js
   /app3_folder
      index.php
      /css
      /js


You'd need to edit each index.php to point to the system folder and relevant application folder, and edit the config.php file in each application folder.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39940385
No points for this, please, but beware of links that say www.mydomain.com because you will need those to be redirected.  Relative links will probably be OK.  Explicit links to mydomain.com will need to be redirected, too.
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question