query-string

This tag matches on an argument in the query string with functionality similar to what is available for matching on cookies. The tag can match for whether the query string argument:
  • is either present or missing
  • has or doesn't have a particular value
  • has or doesn't have a particular sub string inside it

The matching functions can be specified as either case sensitive or case insensitive. The metadata tag is:

<match:query-string name=”arg-name” name-prefix-match=”off” op=”operation-type”>
The properties are as follows:
  • name: Contains the name of the argument in the query string to match against. (the edge server looks for this name in the query string using a case sensitive match).
  • name-prefix-match: This is a flag that indicates whether the parameter name given (above) is just a prefix. The default is off.
  • op: Indicates the match operation to perform. It has to be one of the following five values. Each of these can be testing for the negative by preceding the op name with an exclamation point (for example, “!name-present”)
  • name-present: to check whether given parameter name is present strcmp: The given parameter contains the given value. strcasecmp: Same as strcmp but not case sensitive.
  • strstr: The given parameter contains the given sub string.
  • strcasestr: same as strstr but not case sensitive.wildcard: case sensitive match where “*” represents zero or more characters and “?” represents one character.
  • wildcardcase: same as wildcard but not case sensitive
  • value: Contains the value/substring to match against. (Note: if you want to match against the absence of a value, the edge server will accept value="" and perform the match correctly. However, in version 4.3, MUI will not permit this syntax, so you need to enter it by hand. This limitation will be addressed in version 4.4)
  • unescape: Indicates how to unescape the query parameter's value before the match operation:
  • none: the query string value will be compared as is (this is the default)
  • url-unescape: the query string value will be url unescaped before the comparison

Examples:

  • Check whether the “sessionid” query string parameter is present:
    <match:query-string op="name-present" name="sessionid">
  • Check whether the “sessionid” query string parameter is missing:
    <match:query-string op="!name-present" name="sessionid">
  • Check whether the “account” query string parameter contains the value “valid” (case insensitively):
    <match:query-string op="strcasecmp" name="account" value="valid">
  • Check whether the “account” query string parameter contains a value other than “valid” (case sensitively):
    <match:query-string op="!strcmp" name="account" value="valid">
  • Check whether the “product_name” query string parameter contains the word “computer” anywhere inside it (case sensitively):
    <match:query-string op="strstr" name="product_name" value="computer">
  • Check whether the “product_name” query string parameter doesn't contain the word “computer” (case sensitively):
    <match:query-string op="!strstr" name="product_name" value="computer">