Url rewriting 经典ASP-如何为产品页创建IIS重写?

Url rewriting 经典ASP-如何为产品页创建IIS重写?,url-rewriting,asp-classic,iis-7,iis-7.5,url-rewrite-module,Url Rewriting,Asp Classic,Iis 7,Iis 7.5,Url Rewrite Module,早上好 我一直在考虑通过使用IIS的URL重写选项使我的产品和类别URL的SEO友好,但是我很挣扎,需要一些建议 我正在尝试实现以下内容: 到 有人能帮我创建需要提交到URL重写规则中的信息吗 从外观上看,我需要: -图案 -重定向URL我认为应该将其添加到web.config中 <rules> <clear /> <rule name="Products rewrite" stopProcessing="true"> <match url="

早上好

我一直在考虑通过使用IIS的URL重写选项使我的产品和类别URL的SEO友好,但是我很挣扎,需要一些建议

我正在尝试实现以下内容:

有人能帮我创建需要提交到URL重写规则中的信息吗

从外观上看,我需要: -图案
-重定向URL

我认为应该将其添加到web.config中

<rules>
<clear />
<rule name="Products rewrite" stopProcessing="true">
   <match url="^prod/(.*?)\-(.*)" />
   <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
   </conditions>
   <action type="Rewrite" url="/Product.asp?ProductId={R:1}&title={R:2}" />
</rule>
</rules>

但仅当您确定产品ID的格式为Y000时,才将默认的404错误页更改为404.asp,并解析url以返回正确的信息。这里有一个很好的例子

将其改写为
http://www.dibor.co.uk/prod/Y054/salle-de-bain-dustbin
始终在答案中添加链接的重要内容。
^prod/(Y[0-9]{3})\-(.*)