我在下面使用URLRewrite模块在web.cinfig中设置了重定向规则。
看到Rule1和Rule2具有相同的页面名称(Contact.aspx),但是页面位于不同的文件夹中,并且应重定向到不同的位置。相反,一切都将以“ Rule1”为目标。有人看一下可以帮我解决这个问题吗?
<rule name="Rule1" patternSyntax="ECMAScript" stopProcessing="true">
<match url="Service/Contact.aspx/?" />
<action type="Redirect" url="http://www.samplesite.com/me-two/help/contact" appendQueryString="false" redirectType="Permanent" />
</rule>
<rule name="Rule2" patternSyntax="ECMAScript" stopProcessing="true">
<match url="Commercial/Service/Contact.aspx/?" />
<action type="Redirect" url="http://www.samplesite.com/commercial/help/contact" appendQueryString="false" redirectType="Permanent" />
</rule>
<rule name="Rule3" patternSyntax="ECMAScript" stopProcessing="true">
<match url="Service/Contact.aspx/?" />
<action type="Redirect" url="http://www.otherwebsite.com/commercial/help/contact" appendQueryString="false" redirectType="Permanent" />
</rule>
在网址开头尝试使用大写字母符号
<match url="^Service/Contact.aspx/?" />
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句