How to deal with link redirects when switching from classic ASP to ASP.NET?

I have a large web project that migrates from classic ASP to ASP.NET (around the time) and would like to redirect requests from old addresses, for example:

/some/path/old-page.asp?foo=bar

to new addresses:

/other/path/new-page.aspx?qaz=bak

For quite some time, there will be classic ASP pages that work in parallel with ASP.NET pages, with individual pages being replaced by their ASP.NET versions over time. Where possible, I want to redirect from old pages to new so that users do not receive 404 errors, and also to save the accumulated PageRank on the pages.

My question is: how would you make the redirect logic from classic ASP to new templates? The obvious solution is to replace old-page.asp with some simple VBScript that redirects to new-page.aspx, but in the end I want to get rid of the old .asp files, so I would like to implement the redirection in such a way that they exist and after the site is fully launched in .NET.

One option is to map the .asp extension to ASP.NET and implement a redirect like HttpHandler, but I think there is no way to get the classic ASP engine to start after the request has been submitted to ASP.NET.

+3
source share
2 answers

eCommerce, - .NET. , , asp , SEO. , asp ASP.net, asp , asp, .

, , ISAPI IIS. , IIS BEFORE, asp asp.net. URL- , , asp URL- . , -, , , . , , , , IIS...

, Code Project. . http://www.codeproject.com/KB/ISAPI/isapiredirector.aspx

!

+3

"HTTP 301 - ", , .

http://en.wikipedia.org/wiki/HTTP_301

ISAPI , , , URL.

ISAPI .

  • /
  • URL-.
  • foo.asp bar.aspx, Google, URL- Google. TOS, .
+1

Source: https://habr.com/ru/post/1705973/


All Articles