CodeIgniter Forums
routes help - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: routes help (/thread-26630.html)

routes help - El Forum - 01-19-2010

let's say I have 2 controllers
1) welcome controller
2) stocks controller

and then on the welcome_view page, I want a link that will redirect the user to the stocks_view page

is this correct ?, not sure if its with the $route config file or the code itself
echo anchor('stocks/stocks_view','proceed to stocks page');

should i add on the $route something like this ?
$route['default_controller'] = "welcome"; //this one is the main right ?
$route['default_controller'] = "stocks"; //<-- is this correct ?

routes help - El Forum - 01-19-2010

you don't have to do nothing in the routes
just change the link to this
echo anchor('stocks','proceed to stocks page');

routes help - El Forum - 01-19-2010

//remove this line
$route['default_controller'] = "stocks";