thanks to all of you gave me a good answer. finally i found the answer. the answer is here when the url go to product categories , i created a controller for it and then i routed like this
url -> www.sitename.com/productgroup/groupname
route -> $route['productgroup/(:any)'] = "productgroup/selgrp/$1";
the above route is redirect to productgroup controller when i am hit the product categories. so the pagination problem also solved.
again i say thanks to every to gave me good answer.