Question

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?

Était-ce utile?

La solution

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"
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top