Asp.Net MVC 301重定向

问题描述:

我们以前使用ISAPI重新写(逸岸它仍然是我们的服务器上),尽管它不与ASP.Net MVC工作(财产以后做euxd获得参数)。

We used to use ISAPI Re-Write (Infact its still on our server) although it doesnt work with ASP.Net MVC (Somthing to do with 'euxd' get param).

我们需要实现简单的301重定向一个relaiable的方式,当我们改变了网站的结构,上传一个新的网站等有什么建议?

We need a relaiable way to implement simple 301 redirects, when we change the site structure, upload a new site etc. Any suggestions?

好吧,这我想重定向到/SomeFolder/SomePage.HTML?Param1=X /新页/ X

Ok, it I wanted to redirect /SomeFolder/SomePage.HTML?Param1=X to /NewPage/X

我们怎样才能做到这一点?

How can we do that?

如果您使用的是IIS7,我会推荐使用官方的 IIS7 URL重写模块

If you are using IIS7, I would recommend using the official IIS7 URL Rewrite module.

  • Using the URL Rewrite Module
  • Using URL Rewrite Module 2.0