i have codeigniter project. i am show the product page using router.php for the url change. Here i am facing some problems. the router code is here
Url router.php code
www.sitename.com/products/page/2 -> $route['products/page/(:num)'] = "products";
www.sitename.com/products/product-name -> $route['products/(:any)'] = "products/detail/$1";
www.sitename.com/products/product-categories -> $route['products/(:any)/(:num)'] = "products/selbygrp/$2";
the above code working fine for particular product detail view. But logically i have issues
problem: if i go to pagination links the router go to second route code . and also if select particular product group categories list it will go to second route code . what ever i gave it will go to second route line.
i know the reason for this. if products/ after anything it will take second route. but i don't need like this. the following urls i want
www.sitename.com/products/productname -> for product detailview
www.sitename.com/products/product-categories -> list product categories wise
www.sitename.com/products/page/number -> show product list with pagenation
i am stuck with this, if any possible to do with htaccess for this, give me the guidance thanks advance