Question: Hi guys I'm using zend framework here and I've enabled url-rewrite so all my urls are clean. The thing is that I've incorporated pagination of results on some pages and I want to append parameters to the url in this form: 

```
www.mysite.com/controller/page/2

```

However I can't do it without appending the default action i.e index to the end of the url so I'm compelled to write urls like:

```
www.mysite.com/controller/index/page/2

```

How do I fix this so my url resembles the first one?

Answer: 
I'm pretty new to ZF, but I think you can provide your own router to the front-controller. There you can add a route, which leaves out the "/index"-part.
Depending on the complexity of our setup you could just override the `default` route

```
resources.router.routes.default.route = :action/:page
resources.router.routes.default.defaults.page = 0
resources.router.routes.default.defaults.module = default
resources.router.routes.default.defaults.controller = index
resources.router.routes.default.defaults.action = index
resources.router.routes.default.reqs.page \d+

```