Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.