asp.net url重写
自己写正则
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d{1,})\.html </LookFor>
<SendTo>~/product.asp?id=$1 </SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{1,})/(\w+$)\.html </LookFor>
<SendTo>~/product.asp?id=$1&keyword=$2 </SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{1,})/(\w+$)/(\w+$)\.html </LookFor>
<SendTo>~/product.asp?id=$1&keyword=$2&find=$3 </SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
规则还是自己定,会写正则表达式就行,然后链接的URL参照定义的规则写