Jump to content

Managing CodeIgniter Applications


ShoeLace1291

Recommended Posts

So I've been reading up on the user guide for info on managing applications.  I basically want to have three different applications under one domain name.  The only problem I encountered(which is a big one), is that you can only view one application at a time.  I have three applications, but how would I view each of them, one at a time, by defining the application in my url?  for example, if i wanted to view the "admin" application, the url would be http://localhost/admin

Link to comment
https://forums.phpfreaks.com/topic/214244-managing-codeigniter-applications/
Share on other sites

I'm not a CI user but given your above example, it would seem to me it should be as simple as placing your point of entry index.php file within the appropriate directory, then within that file ensuring that the correct paths are configured.

 

I would be more inclined to use sub domains but its not really that different. With sub domains however your application itself could simply determine how to boostrap (and configure) the application based on what sub domain was used to access the application.

I've run into one problem.  I have four areas to my site: public, admincp, ownercp, and forum.  i want 'public' to be my default site.  My htaccess kinda causes the problem because i can only view the other areas with .php and i don't want that.

I have three applications, but how would I view each of them, one at a time, by defining the application in my url?  for example, if i wanted to view the "admin" application, the url would be http://localhost/admin

 

What you are describing here sounds like different controllers.

Do you have controllers named public, admincp, ownercp, and forum?

 

Or are these separate folders with different applications. If it's different folders why not set up a virtual host for each?

So I've been reading up on the user guide for info on managing applications.

 

Ah.. I guess you missed http://codeigniter.com/user_guide/general/controllers.html#subfolders which allows you to have URL's like

 

http://localhost/admin/

http://localhost/something/

http://localhost/ -- default

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.