【发布时间】:2013-01-19 07:31:14
【问题描述】:
我是 ASP.NET MVC 的新手,正在尝试确定以下任务的最佳方法。我有以下从 Web 窗体应用程序继承的 URL,我想通过在 MVC 中返回以下路径来继续运行:
- http://example.com/Default.aspx -> http://example.com/
- http://example.com/about.aspx -> http://example.com/about
- http://example.com/keyword1-keyword2-contact.aspx -> http://example.com/contact
我应该创建一个新的地图路线还是使用 URL 重写模块?请举例说明您提倡的方法。该应用程序托管在 IIS 7.5 中,并使用 ASP.NET 4.5 和 MVC 4.0。
【问题讨论】: