Welcome Guest, Not a member yet? Register   Sign In
Config route for two different pages?
#1

[eluser]greedyman[/eluser]
I have two urls like this:
For category page
Code:
http://localhost:8080/nammobile/dien-thoai-di-dong-1.html
For product details page
Code:
http://localhost:8080/nammobile/dien-thoai-di-dong-1/nokia-asha-23.html
I try this code but it doesn't work:
Code:
$route['(:any)'] = "front/group/index/$1"; // for group controller
$route['(:any)/(:any)'] = "front/product/details/$1/$2"; // for product controller
Each route is matched for different controller. I use reg exp but it doesn't work too:
Code:
$route['(#[\w]+-[\w]+-[\d]+#)'] = "front/group/index/$1";
Any idea for this problem? Thanks for watching!




Theme © iAndrew 2016 - Forum software by © MyBB