我想重定向到网址
http://www.abc.com/preview.asp?type=content&id=237#logo
到
http://www.abc.com/preview.aspx#logo
关于重写规则的任何想法,如:
<rule name="Home Document" stopProcessing="true">
<match url="^visiting.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^utm_source=invite%2B&utm_medium=Email%2B&utm_campaign=exhibitor$" />
</conditions>
<action type="Redirect" url="http://www.abc.com/visiting.aspx" appendQueryString="false"/>
</rule>
由于
答案 0 :(得分:0)
您需要添加redirectType="Permanent"
以生成301状态代码:
<rule name="Home Document" stopProcessing="true">
<match url="^visiting.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^utm_source=invite%2B&utm_medium=Email%2B&utm_campaign=exhibitor$" />
</conditions>
<action type="Redirect" url="http://www.abc.com/visiting.aspx" appendQueryString="false" redirectType="Permanent"/>
</rule>