rule rule

Request rule element. One or more rules are optional in the <ruleset> element.

Attributes section-d4a3b0496c0c4aa5bd7da87203b9379b

OnMatch = "break" | "continue" | "error": Optional. Default is “break”.

Replace = "first" | "all": Optional. Default is “first”.

RequestType = types: Optional. Specifies which input context the rule applies to. types is a comma-separated list, which may include one or more of the tokens listed in the following table. If RequestType is not specified, the rule applies to requests received on all supported contexts.

token
Context
Description
is
/is/image/
Applied to Image Serving requests
ir
/ir/render/
Applied to Image Rendering requests
static
/is/content/
Applied to static content requests

Name = "text": Optional. Used to identify the <rule> element in debug logs and error messages.

*Attribute* ="value": Optional. <rule> elements may define any of the following attributes in any combination. If specified, and the rule is successfully matched, they override the corresponding catalog attributes for this request. Default is RequestType="is".

Attribute
Corresponding image catalog attribute
DefaultImageMode
attribute::DefaultImageMode
ErrorImage
attribute::ErrorImage
Expiration
attribute::Expiration
MaxPix
attribute::MaxPix
RequestLock
attribute::RequestLock
RequestObfuscation
attribute::RequestObfuscation
RootUrl
attribute::RootUrl
SavePath
attribute::SavePath
WaterMark
attribute::WaterMark

Refer to the description of the corresponding image catalog attribute for details.

The Expiration attributes only override the default attribute values. The override is ignored if a specific catalog::Expiration value applies to the request.

Data section-8fce013a4c724da58af3fee4e7a90e72

<expression>
Optional
<substitution>
Optional
<addressfilter>
Optional
<header>
Optional

Notes section-0c5fbc363070419d8c9800b0c02dc9f9

If both <expression> and <substitution> are specified, and captured substrings are not used, the first matched substring is replaced with <substitution>.

If <expression> is not specified, any path matches and <substitution> is appended to the end of the path.

If <substitution> is not specified, no path or query transformation occurs, but any specified catalog attributes are overridden. If <substitution> is empty, the matched substring is removed.

The <addressfilter> is applied only when a match occurs, and before query rules are applied.

recommendation-more-help
a26166cd-f2f4-45ce-996d-96a0f0d6cf49