Routing classic asp and through an MVC application
- by Matthias
We are starting to convert a large classic asp application into MVC (using C#). An additional requirement is, that all classic routes get "translated" to MVC ones ('mydomain.com/productdetail.asp?id=13' should become 'mydomain.com/products/13') even before we start writing the first controller or view. So basically, we want to use the routing from MVC but have the classic asp handle the response.
An these are my questions:
How to use the new nice urls but have the classic asp handle the construction of the html result?
Within the classic asp page, the new MVC url pattern should be used for links. What is the best way of translating the old urls to the new ones and make the accessible within the classic asp site (using COM I guess).
When an old/classic url is requested, how would I correctly handle that request so that browsers/searchengines would understand that the page has moved to the new url?
Thanks in advance!