【问题标题】:307 redirect rule with Microsoft Rewrite Module 2.0307 重定向规则与 Microsoft Rewrite Module 2.0
【发布时间】:2012-09-27 13:20:47
【问题描述】:

是否可以使用 Microsoft Rewrite Module 2.0 for IIS 7 在 web.config 中创建 307 重定向规则?目标是将一些 post 表单请求重定向到同一域中的另一个路径。

【问题讨论】:

    标签: asp.net redirect iis-7 url-rewriting url-rewrite-module


    【解决方案1】:

    将动作tagredirectType属性设置为"Temporary"

    例如。

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

    【讨论】:

      猜你喜欢
      • 2017-11-19
      • 2013-01-07
      • 1970-01-01
      • 2015-03-23
      • 2015-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-15
      相关资源
      最近更新 更多