• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Application

Hello! This is my first post.
I've just download version 2.1.0.
I have the application folder outsite the System. And I need to make a website application and a backoffice application.
I've try to search in this forum, buy all options I found was for other versions.



Generally, I just put the "backoffice" controllers in it's own subdirectory of the controller directory. Having 2 separate apps seems overkill for this kind of thing, especially when a lot of the code is probably shared.

[quote author="Aken" date="1335302341"]http://ellislab.com/codeigniter/user-guide/general/managing_apps.html[/quote]
Thanks Aken. Let me tell you what I did.

1º Rename application for applications
2º Create 2 folders inside:
3º Copy those 6 folders from
(folders: config, controllers, errors, libraries, models and views)
4º Delete from
folders: config, controllers, errors, libraries, models and views

5º Edit /index.php
... But here is the problem... I have 2 applications.. what PATH should I put in $application_folder variable?
Because /index.php is for the whole installation, right?

Read the very bottom note on that user guide page.

Ok. I did this.

1. Create backoffice folder, create backoffice into backoffice

2. Rename application to frontend

3. Copy all frontend content into backoffice/backoffice

4. Copy index.php into backoffice

5. Change the path in both index.php

now http://site calls /frontend

and http://site/backoffice calls /backoffice/backoffice

I couldn't use backoffice because if I change index.php file name I need to change .htaccess and I dont know how to do it.

Now is like:

RewriteEngine On
RewriteBase /dev/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

So this was the only solution.


Just creating a backoffice directory in the /application/controllers directory makes this stuff so much easier than all of that. Is there a reason why you actually need 2 separate applications? If they were unrelated it would make sense to me, but it seems your backend deals directly with the frontend (as most do), so they are directly related and not really separate applications.

I'd also read Phils article on creating separate front and back end base controllers.

You're right CroNiX. I'll read the post and I'll try it.
Thanks. Thanks to both!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.