Url rewriting Url重写删除文件扩展名,但保留特定页面的查询字符串
我正在努力匹配 我想把它改写成 我有重写规则,但它不起作用Url rewriting Url重写删除文件扩展名,但保留特定页面的查询字符串,url-rewriting,Url Rewriting,我正在努力匹配 我想把它改写成 我有重写规则,但它不起作用 <rule name="Redirect Home Detail Pages"> <match url="(\/abc\/xyz.aspx).*" /> <action type="Redirect" url="/abc/xyz" appendQueryString="True" redirectType="Permanent" /> </rule> 有什么建议吗?应该是
<rule name="Redirect Home Detail Pages">
<match url="(\/abc\/xyz.aspx).*" />
<action type="Redirect" url="/abc/xyz" appendQueryString="True" redirectType="Permanent" />
</rule>
有什么建议吗?应该是这样的:
<rule name="Redirect Home Detail Pages">
<match url="^abc/xyz.aspx$" />
<action type="Redirect" url="/abc/xyz" appendQueryString="True" redirectType="Permanent" />
</rule>
谢谢@victorlontyev