【发布时间】:2014-02-13 05:52:20
【问题描述】:
大家好,我正在做一个项目,我有一个 .aspx 页面 (index.aspx) 出于某些 SEO 原因。 seo 家伙希望我将 index.aspx url 显示为 index.asp
连页面中的链接也应该写成index.asp
我已经写了这条规则,但它说找不到文件,因为它实际上没有找到实际的 .asp 文件.. 所以我只想将 url 路径从 aspx 重写为 asp
<rule name="RewriteASPX">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.asp" />
</rule>
谢谢
【问题讨论】:
标签: asp.net .net url-rewriting