2014-02-12 46 views
0

我使用URLRewrite模块在web.cinfig中设置了下面的重定向规则。URL重写重定向到相同的页面

请参阅规则1和规则2得到相同的页面名称(Contact.aspx),但页面位于不同的文件夹中,并应重定向到不同的位置。相反,所有事情都将以'Rule1'为目标。 任何人都看看它,并帮助我解决这个问题?在URL的开头

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

回答

1

尝试帽象征

<match url="^Service/Contact.aspx/?" />