I m not having luck working with two applications (admin and client) with same installation of the codeigniter.
I referred to many tutorials and did
I copied and pasted admin folder inside application folder and renamed it "client"
and in main index.php I set application folder path to "application/admin". But this works only for admin section, and to run client I have to change application folder path again in index.php. This way I cannot run both admin and client simultaneously.
Please help me out.
Thanks
You can find the following solution helpful:
1.Create a folder 'admin' in the root directory of CodeIgniter.
2.Copy the 'index.php' file inside 'admin' folder.
3.Change the following variables of the 'index.php' file inside 'admin' folder
$system_path = '../system';
$application_folder = '../application/admin';
4.Create a '.htaccess' file inside 'admin' folder and use the following code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
5.Set the $config['base_url'] to 'your url/admin' inside 'application/admin/config/config.php' and autoload 'url' helper.
6.Now you can access the admin panel using 'your url/admin'.
7.Follow the same procedure for 'client'.
From the codeigniter documentation:
Note: Each of your applications will need its own index.php file which calls the desired application. The index.php file can be named anything you want.
http://ellislab.com/codeigniter/user-guide/general/managing_apps.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With