Welcome Guest, Not a member yet? Register   Sign In
Two sites - one ci
#1

[eluser]dianikol85[/eluser]
As the title says I need to run two sites with one installation of CI 2.0.

The first one is the backend and the second one the frontend. A CMS like. What i need to do in order to achieve that?

I am sure that i need to have to application folders but i don't where should put them and what other configuration i need to do.

For example:

1) website.com : the front-end, the actual site for users

2) website.com/administrator : the back-end where i make changes like inserting data to a db which data are going to be shown in the front-end.

I'm sure many people here need to do this.

Thanks in advance!!
#3

[eluser]dianikol85[/eluser]
these are not clear. They miss things about configuration.
#4

[eluser]dianikol85[/eluser]
ok, i manage this as follows:



Code:
application/
          controller/
                    admin/
                    frontend


Then i add this line in routes.php: $route['admin'] = 'admin/(and the controller you want to be the default in the admin controller)';
#5

[eluser]ramm[/eluser]
I have it like that and i didn't have to put anything in routes.php, it works just fine.
#6

[eluser]dianikol85[/eluser]
if i remove the $routes['admin'] = 'admin/...' when i type in the URL mywebsite.com/admin it redirects me to the default controller that i have set here :$route['default_controller']
#7

[eluser]ramm[/eluser]
I have in my routes the default controller set to
Code:
$route['default_controller'] = 'main';
And i have my folders (and controllers) like this:
Code:
application/
    controllers/
        admin/
            main.php
        main.php
    views/
        admin/
            main_admin_view.php
        main_front_view.php




Theme © iAndrew 2016 - Forum software by © MyBB