Welcome Guest, Not a member yet? Register   Sign In
multiple applications setup
#1

Hi Folks,
I am about to built a codeigniter website with a set of multiple applications .
Regarding the directory layout I would like to follow codeigniter standards https://ellislab.com/codeigniter/user-gu..._apps.html and organize the applications accordingly.
/codeigniter_root/application/appone
/codeigniter_root/application/apptwo
/codeigniter_root/application/appthree
What I am missing in the user guide is how should we manage the access to multiple applications.
The user guide mention only access to one specific application by defining “application_folder” in the config.php but the point is the access the application by adding application name as a suffix to the domain-name ex :
http://domain-name/appone , http://domain-name/apptwo , http://domain-name/appthree and I don't see this explanation in the document.
Could anybody point me to right direction?  
Reply
#2

(This post was last modified: 12-31-2015, 07:41 PM by John_Betong.)

After you have installed app one, app two and app three create three index.php files in each app one, app two and app three folders, all with a common $system_folder and relevant $application_folder

$application_folder = "/appone/application"; // similar for app two and app three

Edit:
Have you thought about using sub-domains?
Reply
#3

Hi John,  
Yes the subdomains is IMO the best solution but I don't have access to virtual host settings and customer is explicitly asking for the above solution. I will try your advice and will get back here with the output.
Thank you for your time.
Reply
#4

(This post was last modified: 01-21-2016, 02:19 AM by josepostiga.)

Have you though about using $_SERVER variables where you can get the host that's trying to be accessed and then assign it's name to the $application variable that's in your root index.php file. You must use a system hook, also, to avoid/handle any errors with that workflow.

Here, I'll share some of my work: https://gist.github.com/josepostiga/7d46...69791705c5. Of course, you'll need to edit according to your specific needs, but I think will put you on the right track.
Best regards,
José Postiga
Senior Backend Developer
Reply




Theme © iAndrew 2016 - Forum software by © MyBB