asp.net mvc - How to setup MVC routes to handle old ASP classic pages redirects -


I am migrating ASP classic site to ASP.net MVC.
Is there a way to redirect what's new traffic?

Example: how to go:

  www.mydomain.com/viewpage.asp?pageid=1234  

From:

  www.mydomain.com/page/1234  

Redirection in the BeginRequest method

I Finishing up using # 2 because it is easier for my project

  Sub Application_BeginRequest (as the object-by-sender, _EventArgs) as the bi-sender. Oval by the way String = as request. URL. ToString.ToLower if (fullOriginalpath.Contains ("/viewpage.asp? Pageid =")) then reference. response. Status code = 301 'A permanent redirection issue' Reference Response.Re If you can use sub  

context.RewritePath , but this URL does not change , Then direct ("/ page /" + getPageIDFromPath (full online path) in the client browser.


Comments

Popular posts from this blog

SQL/PHP: Table design question -

NHibernate Passing Session to the Repository -

asp.net - How do I pass login ID as parameter to SharePoint login page? -