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/
O开发者_Python百科nce 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?
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
精彩评论