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?
Asked
Active
Viewed 1,077 times
0
-
6Possible 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 Answers
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:
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
-
-
As it's an admin you shouldn't need it. In case you really want to do that just follow the documentation on https://www.codeigniter.com/userguide3/general/urls.html – Bruno FG Feb 13 '18 at 05:23
-