UrlRewriter.net Expression Examples
- by Tarik
Hello,
I need some web.config examples for each expression types below :
$number
The last substring matched by group number number.
$<name>
The last substring matched by group named name matched by (?< name ).
${property}
The value of the property when the expression is evaluated.
${transform(value)}
The result of calling the transform on the specified value.
${map:value}
The result of mapping the specified value using the map. Replaced with empty string if no mapping exists.
${map:value|default}
The result of mapping the specified value using the map. Replaced with the default if no mapping exists.
Sample:
<rewriter>
<if url="/tags/(.+)" rewrite="/tagcloud.aspx?tag=$1" />
<!-- same thing as <rewrite url="/tags/(.+)" to="/tagcloud.aspx?tag=$1" /> -->
</rewriter>
Thank you very much !