How to use Zend_Config with the RewriteRouter?

153 Views Asked by At

I have the following URL: "http://localhost/mysite/blog/article/index/id/1"

module => blog
controller => article
action => index

and i want to structure my url like so: "http://localhost/mysite/blog/article/1" to set the default 'action' as 'index' and 'id' as '1'. Now how do i write such route in the config.ini file?

1

There are 1 best solutions below

1
On BEST ANSWER
resources.router.routes.article.route = "blog/article/:id"
resources.router.routes.article.defaults.module = "blog"
resources.router.routes.article.defaults.controller = "article"
resources.router.routes.article.defaults.action = "index"