rewrite
Rewrites the current HTTP Request path to the specified location.
Arguments
- to
- The expression to use to rewrite the Location.
- processing
- Optional. What to do after processing the action: continue to the next action, stop or restart from the beginning. The default is continue.
- conditions
- Optional. A set of Conditions which may be specified on this action.
Remarks
Rewrites the current Location to the new Location specified by the to expression. The to argument can specify any replacement, including matches from the last pattern matched. For more information about expressions, see the Expressions topic.
The rewrites to the Location are cumulative, so if you have a series of rewrite actions with the processing argument set to continue, then each rewrite may build on the previous ones, if the conditions match.
Examples
<rewrite url="^/tags/(.+)$" to="/tag-cloud.aspx?tag=$1" processing="stop" /> <if url="^/tags/(.+)$"> <rewrite to="/tag-cloud.aspx?tag=$1" processing="stop" /> </if>