unless
Added in version 2.0b3
The unless action provides a grouping of other actions. The actions nested within the unless action are only executed if the conditions on the unless action are not matched.
Arguments
- conditions
- Optional. A set of Conditions which may be specified on this action.
Remarks
This action allows you to group related actions, potentially making your rewriting rules more efficient. For example, if many rules have the same prefix, then you can group them together and ensure that the prefix matches first.
Examples
<unless header="HTTP_HOST" match="my.domain.com"> <rewrite url="^/tags/big/(.+)$" to="/big-tag-cloud.aspx?tag=$1" processing="stop" /> <rewrite url="^/tags/small/(.+)$" to="/tiny-tag-cloud.aspx?tag=$1" processing="stop" /> <rewrite url="^/tags/medium/(.+)$" to="/normal-tag-cloud.aspx?tag=$1" processing="stop" /> </unless>


