Problem for mapping two applications

#1
[eluser]lama[/eluser]
Hello

I read the "Managing your Applications" tutorial but I have a problem to set two app in my CI.

I have application folder with two sub folder : frontend and backend.

The basic index.php file contains
Code:
$application_folder = 'application/frontend';

After I created an admin folder with a second index.php with this path
Code:
$application_folder = 'application/backend';

But when I go to localhost/myapp/ it's running with my default controler, but when I go to localhost/myapp/admin it's doesn't run. I have a 404 error...

Someone can help me ?

Thank you

#2
[eluser]Aken[/eluser]
Your folder structure should look like this:

Code:
frontendapp/
-- config/
-- controllers/
-- models/
-- etc.../
backendapp/
-- config/
-- controllers/
-- models/
-- etc./
index.php // application_folder = frontendapp
backend.php // application_folder = backendapp

#3
[eluser]lama[/eluser]
It doesn't work.

I would like to make an admin panel for my website at the url "myapp/admin" and I want to use "app" to display all the web site to my visitor.

I try with

Code:
localhost/myapp/
------------------------- index.php
------------------------- backend.php (which target backend folder)
localhost/myapp/frontend/
------------------------- /views
------------------------- /controllers
localhost/myapp/backend/
------------------------- /views
------------------------- /controllers


but when I type /backend I always have the 404 error

Maybe it's my htaccess :

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
RewriteRule ^(.*) index.php/$1 [L]

thanks you

#4
[eluser]Aken[/eluser]
You need to add to your .htaccess to tell anything within the /backend folder URI to route to your backend.php index file. Otherwise everything will be yoursite.com/backend.php/controller/function


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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