Matches & Features

Applies To:
HTTP Large
HTTP Small
ADN
HTTP Rules Engine

This section provides detailed information on:

Match/Feature Syntax

A value can be defined for certain match options and features. This value may consist of:

The type of match/feature determines how special characters will be treated. There are three types of match/features:

Literal Match Options

Literal match options treat all special characters, with the exception of the % symbol, as a part of the value that must be matched. In other words, a literal match option set to "\'*'\" will only be satisfied when that exact value (i.e., \'*'\) is matched.

Note: A percentage symbol is used to indicate URL encoding (e.g., %20).

Note: Literal match options define all match options that do not support wildcards or regular expressions.

Wildcard Match Options

Special characters take on a new meaning for match options that support wildcards. The following table describes how this type of match option interprets the following set of characters.

Character Description
\

A backslash is used to escape any of the characters specified in this table. A backslash must be specified directly before the special character that should be escaped.

For example, the following syntax escapes an asterisk:

\*
% A percentage symbol is used to indicate URL encoding (e.g., %20).
* An asterisk is a wildcard that represents one or more characters.
Space A space character indicates that a match option can be satisfied by either of the specified values or patterns.
'value'

A single quote does not have special meaning. However, a set of single quotes is used to indicate that a value should be treated as a literal value. A literal value serves the following purposes:

  • It allows a match option to be satisfied whenever the specified value matches any portion of the comparison value.

    For example, 'ma' would match any of the following strings:
    • /business/marathon/asset.htm
    • map.gif
    • /business/template.map
  • It allows a special character to be specified as a literal character. For example, you may specify a literal space character by enclosing a space character within a set of single quotes (i.e., ' ' or 'sample value').
  • It allows a blank value to be specified. Specify a blank value by specifying a set of single quotes (i.e., '').

Key information:

  • If the specified value does not contain a wildcard, then it will automatically be considered a literal value. This means that it is not necessary to specify a set of single quotes.
  • If a backslash does not escape another character in this table, then it will be ignored when specified within a set of single quotes.
  • Another way to specify a special character as a literal character is to escape it using a backslash (i.e., \).

Regular Expression Match/Feature Options

Regular expressions define a pattern that will be searched for within a text value. Regular expression notation defines specific meanings to a variety of symbols. The following table indicates how special characters are treated by match/feature options that support regular expressions.

Note: Match/feature options that support regular expressions are only available with HTTP Rules Engine - Advanced Rules. For more information, please contact your CDN account manager.

Note: This section solely highlights how regular expression match/feature options handle "special characters." The information provided here is not meant to be a comprehensive guide on regular expressions or its syntax.

Special Character Description
\

A backslash escapes the character the follows it. This causes that character to be treated as a literal value instead of taking on its regular expression meaning.

For example, the following syntax escapes an asterisk:

\*
%

The meaning of a percentage symbol depends on its usage.

  • %{HTTPVariable}: This syntax identifies an HTTP variable.
  • %{HTTPVariable%Pattern}: This syntax uses a percentage symbol to identify an HTTP variable and as a delimiter.
  • \%: Escaping a percentage symbol allows it to be used as a literal value or to indicate URL encoding (e.g., \%20).
* An asterisk allows the preceding character to be matched zero or more times.
Space A space character is typically treated as a literal character.
'value' Single quotes are treated as literal characters. A set of single quotes does not have special meaning.