redirect
Redirects the current HTTP Request to the specified location (using either 301 or 302 redirects, depending on the value for the “permanent” parameter).
Arguments
- to
- The expression to use to rewrite the Location.
- permanent
- Optional. Determines if the redirection is permanent (301) or temporary (302). Default value is true.
- conditions
- Optional. A set of Conditions which may be specified on this action.
Remarks
Redirects 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.
Redirect is a final action. Processing will stop if this action is invoked, and the response will be redirected immediately. No other actions specified after this action will be processed.
Examples
<redirect url="^/tags/(.+)$" to="/tag-cloud.aspx?tag=$1" /> <if url="^/tags/(.+)$"> <redirect to="/tag-cloud.aspx?tag=$1" /> </if>