tags:

views:

30

answers:

1

How can you hide the controller in the URL? When a non-registered user comes to my website, I would like them to see:

http://www.site.com/

Once they log-in, then they would be directed to the "Home" controller, then appearing as normal (i.e. http://www.site.com/home)

Any suggestions?

+1  A: 

You can set the 'Home' controller as default, by using CodeIgniter's routing feature.

To set a default controller, open 'application/config/routes.php', and set:

$route['default_controller'] = 'Home';

CodeIgniter - Setting a default controller

CodeIgniter - URI Routing

Rocket