Welcome Guest, Not a member yet? Register   Sign In
Routes order
#1
Rainbow 

Im just learning about codeigniter and am stumped by the following:

I have these routes in my routes file:

$route['(:any)'] = 'pages/view';
$route['news/create'] = 'news/create';
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['default_controller'] = 'pages/view';

Yet when I load "http://localhost:8888/clinicases/index.php/news," it loads the news page rather than 'pages/view,' i thought that because i have the catchall route at the top, this page would also just load pages/views.

Where am i going wrong?

Thanks! Big Grin
Reply


Messages In This Thread
Routes order - by Gareehc - 09-21-2015, 03:44 AM
RE: Routes order - by mwhitney - 09-21-2015, 08:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB