1.参数用()括起来,使用 $1 来获得参数。
2.多个参数的时候使用&分割。
3.把Intelligencia.UrlRewriter.dll添加到bin目录
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
<system.web>
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" name="UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<!--首页-->
<rewrite url="~/default.html$" to="~/default.aspx" processing="stop"/>
<!--新闻-->
<rewrite url="~/news/list-([A-Za-z0-9-]*).html$" to="~/NewsList.aspx?typeUrl=$1" processing="stop"/>
<rewrite url="~/news/list-([A-Za-z0-9-]*)-([0-9]*).html$" to="~/NewsList.aspx?typeUrl=$1&page=$2" processing="stop"/>
<!--新闻详细-->
<rewrite url="~/news/([A-Za-z0-9-]*).html$" to="~/NewsDetail.aspx?url=$1" processing="stop"/>
</rewriter>
</configuration>