<RewriterRule>
<LookFor>~/Sort_([-\d]+).html</LookFor>
<SendTo><![CDATA[~/Sort.aspx?Categoryid=$1]]></SendTo>
</RewriterRule>
这样写是没错的,但是 <RewriterRule>
<LookFor>~/Sort.html/([-\d]+)</LookFor>
<SendTo><![CDATA[~/Sort.aspx?Categoryid=$1]]></SendTo>
</RewriterRule>
这样写就有问题了,这是为何呢urlrewrite
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/index2.aspx?ID=$1"
ignoreCase="true" />
<urlrewritingnet
rewriteOnlyVirtualUrls="false"
contextItemsPrefix="QueryString"
defaultPage="index.html"
defaultProvider="RegEx"
xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >用这个东西我发现有个坏处,比如我想直接访问 www.hostname.com
但,用了这东西之后就必须这样 www.hostname.com/index.html 才能访问,不知道咋解决好呢
肯定不对嘛,你试想下~/Sort.html/([-\d]+),会有Sort.html/1吗,你要说Sort/1我还觉得更好