I speak English not well, so sorry.
The code.
routers.ini:
routes.cat1.type = "Zend_Controller_Router_Route_Regex"
routes.cat1.route = "showcat/(\d+)-(\d+)"
routes.cat1.defaults.module = "default"
routes.cat1.defaults.controller = "category"
routes.cat1.defaults.action = "viewcategory"
routes.cat1.map.1 = "id1"
routes.cat1.map.2 = "page"
routes.cat1.reverse = "showcat/%d-%d"
When i visit:
showcat/6
It returns error: Invalid controller specified (showcat)
But when i visit:
showcat/6-1
It works fine.
When i add following router to fix above problem:
routes.cat2.type = "Zend_Controller_Router_Route_Regex"
routes.cat2.route = "showcat/(\d+)"
routes.cat2.defaults.module = "default"
routes.cat2.defaults.controller = "category"
routes.cat2.defaults.action = "viewcategory"
routes.cat2.map.1 = "id1"
routes.cat2.reverse = "showcat/%d"
but the pagination doesn't work.
Can anyone help me solve this problem?
Thanks!