这是我发现/猜测的。未测试。
$number : http://urlrewriter.net/index.php/support/using
<rewrite url="^(.*)/(\?.+)?$" to="$1/default.aspx$2?" />
$1 matches (.*)
$2 matches (\?.+)
$< name > :这个我在正则表达式上不太确定,在文档中找不到任何东西
<rewrite url="^(?<group1>(.*))/(\?.+)?$" to="$<group1>/default.aspx$2?" />
$<group1> matches
${property}:http ://urlrewriter.net/index.php/support/reference/actions/set-property
<set property="branch" value="$3" />
<rewrite to="/showbranch.aspx?branch=${branch}" />
${transform(value)}:http ://urlrewriter.net/index.php/support/reference/transforms
<set property="transform-name" value="lower" />
<set property="value-to-transform" value="THIS WAS UPPER CASE" />
<redirect to="/WebForm1.aspx?q=${encode(${${transform-name}(${value-to-transform})})}" />
results in "/WebForm1.aspx?q=this+was+upper+case"
${map:value}:http ://urlrewriter.net/index.php/support/reference/transforms/static
<mapping name="areas">
<map from="sydney" to="1" />
<map from="melbourne" to="2" />
<map from="brisbane" to="3" />
</mapping>
<rewrite to="/area.aspx?area=${areas:$3}" />
results in "/area.aspx?area=brisbane"
${地图:值|默认}
<mapping name="areas">
<map from="sydney" to="1" />
<map from="melbourne" to="2" />
<map from="brisbane" to="3" />
</mapping>
<rewrite to="/area.aspx?area=${areas:$4|perth}" />
results in "/area.aspx?area=perth"