文章内容

2017/5/24 9:28:44,作 者: 黄兵

Asp.Net MVC 301 Redirects

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).

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

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

How can we do that?

注释:

我们曾经使用ISAPI重写(Infact仍然在我们的服务器上),尽管它不能工作在ASP.Net MVC环境下(与euxd'获得参数有关)。

当我们更改站点结构,上传新站点的时候,需要一个可靠的方式来实现简单的301重定向,有什么好的方式实现301重定向?

例如:我想将/SomeFolder/SomePage.HTML?Param1=X重定向到/NewPage/X

我们该怎么做呢?

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

注释:

如果你使用IIS 7作为web服务器,你可以使用官方提供的IIS7 URL 重写模块

具体如何使用iis7 url重写工具参考我的这一篇文章:IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS

分享到:

发表评论

评论列表