Upgrade classic ASP to MVC 4.0

2019-08-28 11:17发布

I'm in the process of upgrading from classic ASP to MVC 4.0. MVC projects have a unique folder structure with modules, views, and controllers. Our classic ASP website is very well indexed in search engines, and uses all friendly URLs (some mapped to existing folders and removing page extensions, and others mapped for SEO and not to the folder containing the files), using Rewrite Rules in web.config. I need to maintain all the current URLs, but they all map into different folders than the MVC project will. I'd like the MVC project to remain in the folder structure defined in the default project, but also need to continue using the existing URLs.

What is the best way to maintain the current URLs of the site when moving to MVC? Is custom routing the only/best way to handle this?

1条回答
何必那么认真
2楼-- · 2019-08-28 11:44

I gues there are four ways to do rewriting urls, no matter which one you use, you need to do some changes. For example you should change the way you read the url parameters.

I follow this tutorial http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

It helps alot

查看更多
登录 后发表回答