Chapter 6: Definition Reference
define url condition
Binds a user-defined label to a set of URL prefix patterns for use in a condition= expression. Using this definition block allows you to quickly test a large set of url= conditions. Although the define condition definition block could be used in a similar way to encapsulate a set of URL prefix patterns, this specialized definition block provides a substantial performance boost.
The manner in which the URL patterns and any condition expressions are listed is significant. Each line begins with a URL pattern suitable to a url= condition and, optionally, one or more condition expressions, all of which have a Boolean AND relationship. Each line inside the definition block is considered to have a Boolean OR relationship with other lines in the block.
Syntax
define url condition label url_prefix_pattern [condition_expression ...]
...
end [url condition label]
where:
•label—A user-defined identifier for a prefix condition definition.
•url_prefix_pattern ... —A URL pattern that includes at least a portion of the following: scheme://host:port/path
❐scheme—A URL scheme (http, https, ftp, mms, or rtsp) followed by a colon (:).
❐host—A host name or IP address, optionally preceded by two forward slashes (//). Host names must be complete; for example, url=http://www will fail to match a URL such as http://www.example.com. This use of a complete host instead of simply a domain name (such as example.com) marks the difference between the prefix and domain condition definition blocks.
❐port—A port number, between 1 and 65535.
❐path—A forward slash (/) followed by one or more full directory names.
Accepted prefix patterns include the following:
scheme://host
scheme://host:port
scheme://host:port/path
scheme://host/path
//host
//host:port
//host:port/path
//host/path host host:port host:port/path host/path /path
•condition_expression ...—An optional condition expression, using any of the conditions available in a rule. For more information, see Chapter 3: "Condition Reference". The layer and