0

I'm trying to create a clone ( http://site.com/indexclone ) for http://site.com/index, but I also want all actions to be functional as they are in IndexController and potential parameters that are passed to original controller. I've figured out so far:

resources.router.routes.indexclone.route = "indexclone/:action"
resources.router.routes.indexclone.defaults.controller = "index"
resources.router.routes.indexclone.defaults.action = "index"

Please help me figure out the dynamic approach to the parameters list. Thank you in advance!

4

1 に答える 1

1

あなたはこれを行うことができます:

resources.router.routes.indexclone.route = "indexclone/:action/*"
resources.router.routes.indexclone.defaults.controller = "index"
resources.router.routes.indexclone.defaults.action = "index"

しかし、問題が解決しない場合は、ブートストラップを使用して動的ルーターを作成できます。

于 2012-09-10T13:00:03.350 に答える