问题
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.
回答1:
Set redirectType attribute of action tag to "Temporary"
Eg.
<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>
来源:https://stackoverflow.com/questions/12622367/307-redirect-rule-with-microsoft-rewrite-module-2-0