0

we have change our domain name from old.com to new.com and put a new ASP MVC 4 web site on old.com

Because search engine still point to old.com we would like to redirect some urls to the new one.

What is the possible ways to tap into ASP MVC pipeline to respond with redirect answer?

Thank you, Ido.

Ido Ran
  • 10,584
  • 17
  • 80
  • 143

2 Answers2

0

If the only thing that has changed is the domain name, why not just use IIS to set up a permanent site redirect from old to new instead of using MVC?

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
0

The HTTP response status code 301 Moved Permanently is used for permanent redirection.

Google recommends using a 301 redirect to change the URL of a page as it is shown in search engine results.

According to this question here you have 2 options:

  1. Installing the HTTP Redirect feature in IIS7.

  2. Do redirection at application level (using Application_BeginRequest at Global.asax).

Community
  • 1
  • 1
Koste
  • 538
  • 6
  • 17