Codeigniter URI Routing Issue
I have the following URL
domain.com/name/details/12345
开发者_开发知识库I want it so if someone types in
domain.com/name/12345 it goes to the above
I am using $route[‘name/details/(:num)’] = ‘name/’;
But I get a 404 error when I try it.
From looking at the documentation: http://ellislab.com/codeigniter/user_guide/general/routing.html
It looks like what you want is:
$route['name/(:num)'] = 'name/details/$1';
The route name/12345 is matched and routed to name/details/12345
精彩评论