我的链接看起来像这样:
https://myhost.com/Forums/Category/
https://myhost.com/Forums/SubCategory/
https://myhost.com/Forums/SubSubCategory/
现在这个路由配置正在捕获上面的路由:
context.MapRoute(
"Forums_category",
"Forums/{category}",
new { controller = "Forums", action = "ThreadList" }
);
这就是我想使用的:
https://myhost.com/Forums/Category/SubCategory/SubSubCategory
我希望它被捕获为:
context.MapRoute(
"Forums_category",
"Forums/{THIS_IS_IGNORED}/{category}",
new { controller = "Forums", action = "ThreadList" }
);
所以,基本上我希望它只捕获链接中的最后一个变量。那可能吗?