【发布时间】:2012-04-07 12:57:40
【问题描述】:
简单的问题:
如何匹配 MVC3 路由系统中的字符串?
例子:
{sub}.domain.com/{contoller}/{action}/{id}
sub = [Match any string here]
【问题讨论】:
标签: asp.net-mvc-3 routing url-routing string-matching
简单的问题:
如何匹配 MVC3 路由系统中的字符串?
例子:
{sub}.domain.com/{contoller}/{action}/{id}
sub = [Match any string here]
【问题讨论】:
标签: asp.net-mvc-3 routing url-routing string-matching
您的问题似乎是answered here。
基本上,要访问 {subdomain}.domain.com,正常的路由处理程序不会在那里查看,但您可以创建自己的自定义 Route 类,并将其注册到 Global.asax Application_Start() .
【讨论】: