与微软重写模块2.0 307重定向规则 [英] 307 redirect rule with Microsoft Rewrite Module 2.0

查看:172
本文介绍了与微软重写模块2.0 307重定向规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时有可能使微软重写模块2.0在web.config中一个307重定向规则的IIS 7?我们的目标是在同一域内一些后形式的请求到另一条路径重定向。

Is it possible to make a 307 redirect rule in web.config with Microsoft Rewrite Module 2.0 for IIS 7? The goal is to redirect some post form requests to another path within the same domain.

推荐答案

redirectType 动作属性的标签临时

例如:

<rewrite>
      <rules>
        <rule name="RedirectRule" stopProcessing="true">
          <match url="(.*)" ignoreCase="true" />
          <action type="Redirect" url="http://www.newdomain.com/{R:1}" redirectType="Temporary" />
            <conditions>
                <add input="{HTTP_HOST}" pattern="www\.old-domain\.com" />
            </conditions>
        </rule>
      </rules>
    </rewrite>

这篇关于与微软重写模块2.0 307重定向规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆