naioshi cozmicboy wrote:
Hi all,

I would like to set my router to use IndexController in case the
controller name is invalid.

e.g.

1. http://example.net/library/index/edit/id/12   (ok)
2. http://example.net/library/edit/id/12   (error: invalid controller)


I've wanted something similar on a recent site, and I think the only way is by setting a specialized route:

either globally like

:module/:action/*

(which will work that way across the board on all modules)

or specifically for that library route:

library/:action/*


My ini file for the latter would look like:

routes.library.route                            = "library/:action/*"
routes.library.defaults.module                  = "library"
routes.library.defaults.controller              = "index"

Reply via email to