How to do routing in Codeigniter

I have a problem with routing in CI. I have a controller with parameters that supports categories and subcategories category$1/subcategory$2 I came up with such entries, but they do not quite work. $route[‘(:any)’] = ‘ads/cat/$1’; $route[‘(:any)/(:any)’] = ‘ads/cat/$1/$2’; $route[‘(:any)/(:any)/(:num)’] = ‘ads/cat/$1/$2/$3’; Everything works until I add pagination – $3. I mean pagination works only for…

Details