因为我有这个网址:
http://namedomain.com/product.asp?id=01&color=05&name=xxxx
重写此网址的更好方法是:
http://namedomain.com/xxxx
使用IIS我能够生成此URL
http://namedomain.com/01/05/xxxx
这是web.config代码:
<rule name="RedirecionaPagProduto" stopProcessing="true">
<match url="^exibe_produtos\.asp$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^produto=([^=&]+)&cor=([^=&]+)&url=([^=&]+)$" />
</conditions>
<action type="Redirect" url="{C:1}/{C:2}/{C:3}" appendQueryString="false" />
</rule>
<rule name="RenamePagProduto" stopProcessing="true">
<match url="^([^/]+)/([^/]+)/([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="exibe_produtos.asp?produto={R:1}&cor={R:2}&url={R:2}" />
</rule>
任何人都可以提供帮助吗?