Specifications
Chapter 8: Working with Match Rules
136 Equalizer Installation and Administration Guide
Match Function Notes
1. Considering Case in String Comparisons: String comparisons performed by match functions
honor the setting of the ignore case cluster parameter: if it is set on the cluster (the default),
then all match rule functions used for that cluster are case insensitive; that is, the case of strings
is ignored. For example, the string “ab” will match occurrences of “ab”, “Ab”, “aB”, and “AB”.
If ignore case is not set on the cluster, then all string comparisons are by default case sensitive
(the string “ab” will match only “ab”). To override the ignore case flag setting on the cluster
for a match function or block of functions, you must logically AND the observe_case() or
ignore_case() functions with the match function or block. For example, if ignore case is set on
the cluster, you would use the following construct to force the header_substr() function to
make case sensitive string comparisons:
(observe_case() AND header_substr("host", "MySystem"))
filename(string) This function evaluates to true if the string argument exactly matches
the filename portion of the URI path. This portion includes only the text
after the last trailing path component separator (/), as that is
considered part of the directory (for example, “file.html” is the filename
portion of “/foo/bar/file.html”).
filename_prefix(string) This function evaluates to true if the string argument is a prefix of the
filename portion of the URI path.
filename_suffix(string) This function evaluates to true if the string argument is a suffix of the
filename portion of the URI path.
filename_substr(string) This function evaluates to true if the string argument is a substring of
the filename portion of the URI path.
filename_regex(string) This function evaluates to true if the string argument, interpreted as a
regular expression, matches the filename portion of the URI path.
query(string) This function evaluates to true if the string argument exactly matches
the (optional) query component of the request URI. The query, if
present, appears in a URI following a question mark (?). The syntax
of a query is application specific, but generally is a sequence of key/
value pairs separated by an ampersand (&).
query_prefix(string) This function evaluates to true if the string argument is a prefix of the
query portion of the URI path.
query_suffix(string) This function evaluates to true if the string argument is a suffix of the
query portion of the URI path.
query_substr(string) This function evaluates to true if the string argument is a substring of
the query portion of the URI path.
query_regex(string) This function evaluates to true if the string a
rgument, interpreted as a
regular expression, matches the que
ry portion of the URI path.
Table 63: URI-based Match Functions
URI Match Function Description