0

I am going to create a web page that has two parts - main page and admin page. I like to do it in CodeIgniter. So I want two separate application folder for main page and admin page in one CodeIgniter. How can I create and configure two application folders and how to link both?

mmvsbg
  • 3,570
  • 17
  • 52
  • 73
varunvenu
  • 13
  • 6
  • 6
    Possible duplicate of [Separate Admin and Front in codeigniter](https://stackoverflow.com/questions/7511425/separate-admin-and-front-in-codeigniter) – Touheed Khan Feb 12 '18 at 09:28

1 Answers1

0

The way I like to do is the following:

Firstly, duplicate the index.php located under the root folder. I would rename it to admin.php.

Open the admin.php, locate the following line:

$application_folder = 'application';

Change to:

$application_folder = 'application/admin';

Do the same on the index.php but change the line to:

$application_folder = 'application/front';

Go into the Application folder and create two folders:

application/admin/

application/front/

Copy all the content that is under application for both admin/ and front/ and then delete those folders from the application root folder.

It should look like that:

it should look like that

I also recommend you to do the same for assets, having both folders to separate the content:

assets/admin

assets/front

Bruno FG
  • 125
  • 6