admin管理员组

文章数量:1642330

redirectType="Found"和redirectType="Permanent"哪个是301哪个是302?

在IIS7以上的服务器中,设置伪静态要使用web.config文件也编写转发代码。转发规则中,有redirectType="Found"这么一句,这个是什么意思呢?万维景盛工程师为您解答一下。

先贴一下http到https转发的完整代码:

1

2

3

4

5

                      <match url="(.*)" />

                      <conditions>

                      <add input="{HTTPS}" pattern="off" ignoreCase="true" />

                      </conditions>

                      <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />

这里面的

1

redirectType="Permanent"

表示永久转向,也就是301重定向。

而redirectType="Found"则是丢失的文件找到了的意思,是临时重定向,也就是302重定向。

本文标签: quotredirectTypepermanent