Azure CDN rules engine match conditions

This article lists detailed descriptions of the available match conditions for the Azure Content Delivery Network (CDN) rules engine.

The second part of a rule is the match condition. A match condition identifies specific types of requests for which a set of features will be performed.

For example, you can use a match condition to:

  • Filter requests for content at a particular location.
  • Filter requests generated from a particular IP address or country.
  • Filter requests by header information.

Always match condition

The Always match condition applies a default set of features to all requests.

Name Purpose
Always Applies a default set of features to all requests.

Device match condition

The Device match condition identifies requests made from a mobile device based on its properties.

Name Purpose
Device Identifies requests made from a mobile device based on its properties.

Location match conditions

The Location match conditions identify requests based on the requester's location.

Name Purpose
AS Number Identifies requests that originate from a particular network.
Country Identifies requests that originate from the specified countries.

Origin match conditions

The Origin match conditions identify requests that point to Content Delivery Network storage or a customer origin server.

Name Purpose
CDN Origin Identifies requests for content stored in Content Delivery Network storage.
Customer Origin Identifies requests for content stored on a specific customer origin server.

Request match conditions

The Request match conditions identify requests based on their properties.

Name Purpose
Client IP Address Identifies requests that originate from a particular IP address.
Cookie Parameter Checks the cookies associated with each request for the specified value.
Cookie Parameter Regex Checks the cookies associated with each request for the specified regular expression.
Edge Cname Identifies requests that point to a specific edge CNAME.
Referring Domain Identifies requests that were referred from the specified host names.
Request Header Literal Identifies requests that contain the specified header set to a specified value.
Request Header Regex Identifies requests that contain the specified header set to a value that matches the specified regular expression.
Request Header Wildcard Identifies requests that contain the specified header set to a value that matches the specified pattern.
Request Method Identifies requests by their HTTP method.
Request Scheme Identifies requests by their HTTP protocol.

URL match conditions

The URL match conditions identify requests based on their URLs.

Name Purpose
URL Path Directory Identifies requests by their relative path.
URL Path Extension Identifies requests by their file name extension.
URL Path Filename Identifies requests by their file name.
URL Path Literal Compares a request's relative path to the specified value.
URL Path Regex Compares a request's relative path to the specified regular expression.
URL Path Wildcard Compares a request's relative path to the specified pattern.
URL Query Literal Compares a request's query string to the specified value.
URL Query Parameter Identifies requests that contain the specified query string parameter set to a value that matches a specified pattern.
URL Query Regex Identifies requests that contain the specified query string parameter set to a value that matches a specified regular expression.
URL Query Wildcard Compares the specified value against the request's query string.

Reference for rules engine match conditions


Always

The Always match condition applies a default set of features to all requests.

Back to top



AS Number

The AS Number network is defined by its autonomous system number (ASN).

The Matches/Does Not Match option determines the conditions under which the AS Number match condition is met:

  • Matches: Requires that the ASN of the client network matches one of the specified ASNs.
  • Does Not Match: Requires that the ASN of the client network does not match any of the specified ASNs.

Key information:

  • Specify multiple ASNs by delimiting each one with a single space. For example, 64514 64515 matches requests that arrive from either 64514 or 64515.
  • Certain requests might not return a valid ASN. A question mark (?) will match requests for which a valid ASN could not be determined.
  • Specify the entire ASN for the desired network. Partial values will not be matched.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



CDN Origin

The CDN Origin match condition is met when both of the following conditions are met:

  • Content from CDN storage was requested.
  • The request URI uses the type of content access point (for example, /000001) that's defined in this match condition:
    • CDN URL: The request URI must contain the selected content access point.
    • Edge CNAME URL: The corresponding edge CNAME configuration must point to the selected content access point.

Key information:

  • The content access point identifies the service that should serve the requested content.
  • Don't use an AND IF statement to combine certain match conditions. For example, combining a CDN Origin match condition with a Customer Origin match condition would create a match pattern that could never be matched. For this reason, two CDN Origin match conditions cannot be combined through an AND IF statement.

Back to top



Client IP Address

The Matches/Does Not Match option determines the conditions under which the Client IP Address match condition is met:

  • Matches: Requires that the client's IP address matches one of the specified IP addresses.
  • Does Not Match: Requires that the client's IP address does not match any of the specified IP addresses.

Key information:

  • Use CIDR notation.
  • Specify multiple IP addresses and/or IP address blocks by delimiting each one with a single space. For example:
    • IPv4 example: 1.2.3.4 10.20.30.40 matches any requests that arrive from either address 1.2.3.4 or 10.20.30.40.
    • IPv6 example: 1:2:3:4:5:6:7:8 10:20:30:40:50:60:70:80 matches any requests that arrive from either address 1:2:3:4:5:6:7:8 or 10:20:30:40:50:60:70:80.
  • The syntax for an IP address block is the base IP address followed by a forward slash and the prefix size. For example:
    • IPv4 example: 5.5.5.64/26 matches any requests that arrive from addresses 5.5.5.64 through 5.5.5.127.
    • IPv6 example: 1:2:3:/48 matches any requests that arrive from addresses 1:2:3:0:0:0:0:0 through 1:2:3:ffff:ffff:ffff:ffff:ffff.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



The Matches/Does Not Match option determines the conditions under which the Cookie Parameter match condition is met.

  • Matches: Requires a request to contain the specified cookie with a value that matches at least one of the values that are defined in this match condition.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified cookie.
    • It contains the specified cookie, but its value does not match any of the values that are defined in this match condition.

Key information:

  • Cookie name:
    • Because wildcard values, including asterisks (*), are not supported when you're specifying a cookie name, only exact cookie name matches are eligible for comparison.
    • Only a single cookie name can be specified per instance of this match condition.
    • Cookie name comparisons are case-insensitive.
  • Cookie value:
    • Specify multiple cookie values by delimiting each one with a single space.
    • A cookie value can take advantage of wildcard values.
    • If a wildcard value has not been specified, then only an exact match will satisfy this match condition. For example, specifying "Value" will match "Value," but not "Value1" or "Value2."
    • Use the Ignore Case option to control whether a case-sensitive comparison is made against the request's cookie value.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



The Cookie Parameter Regex match condition defines a cookie name and value. You can use regular expressions to define the desired cookie value.

The Matches/Does Not Match option determines the conditions under which the Cookie Parameter Regex match condition is met.

  • Matches: Requires a request to contain the specified cookie with a value that matches the specified regular expression.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified cookie.
    • It contains the specified cookie, but its value does not match the specified regular expression.

Key information:

  • Cookie name:
    • Because regular expressions and wildcard values, including asterisks (*), are not supported when you're specifying a cookie name, only exact cookie name matches are eligible for comparison.
    • Only a single cookie name can be specified per instance of this match condition.
    • Cookie name comparisons are case-insensitive.
  • Cookie value:
    • A cookie value can take advantage of regular expressions.
    • Use the Ignore Case option to control whether a case-sensitive comparison is made against the request's cookie value.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Country

You can specify a country through its country code.

The Matches/Does Not Match option determines the conditions under which the Country match condition is met:

  • Matches: Requires the request to contain the specified country code values.
  • Does Not Match: Requires that the request does not contain the specified country code values.

Key information:

  • Specify multiple country codes by delimiting each one with a single space.
  • Wildcards are not supported when you're specifying a country code.
  • The "EU" and "AP" country codes do not encompass all IP addresses in those regions.
  • Certain requests might not return a valid country code. A question mark (?) will match requests for which a valid country code could not be determined.
  • Country codes are case-sensitive.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Implementing Country Filtering by using the rules engine

This match condition allows you to perform a multitude of customizations based on the location from which a request originated. For example, the behavior of the Country Filtering feature can be replicated through the following configuration:

  • URL Path Wildcard match: Set the URL Path Wildcard match condition to the directory that will be secured. Append an asterisk to the end of the relative path to ensure that access to all of its children will be restricted by this rule.

  • Country match: Set the Country match condition to the desired set of countries.

    • Allow: Set the Country match condition to Does Not Match to allow only the specified countries access to content stored in the location defined by the URL Path Wildcard match condition.
    • Block: Set the Country match condition to Matches to block the specified countries from accessing content stored in the location defined by the URL Path Wildcard match condition.
  • Deny Access (403) Feature: Enable the Deny Access (403) feature to replicate the allow or block portion of the Country Filtering feature.

Back to top



Customer Origin

Key information:

  • The Customer Origin match condition is met regardless of whether content is requested through a CDN URL or an edge CNAME URL that points to the selected customer origin.
  • A customer origin configuration that's referenced by a rule cannot be deleted from the Customer Origin page. Before you attempt to delete a customer origin configuration, make sure that the following configurations do not reference it:
    • A Customer Origin match condition
    • An edge CNAME configuration
  • Don't use an AND IF statement to combine certain match conditions. For example, combining a Customer Origin match condition with a CDN Origin match condition would create a match pattern that could never be matched. For this reason, two Customer Origin match conditions cannot be combined through an AND IF statement.

Back to top



Device

The Device match condition identifies requests made from a mobile device based on its properties. Mobile device detection is achieved through WURFL.

The Matches/Does Not Match option determines the conditions under which the Device match condition is met:

  • Matches: Requires the requester's device to match the specified value.
  • Does Not Match: Requires that the requester's device does not match the specified value.

Key information:

  • Use the Ignore Case option to specify whether the specified value is case-sensitive.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

String Type

A WURFL capability typically accepts any combination of numbers, letters, and symbols. Due to the flexible nature of this capability, you must choose how the value associated with this match condition is interpreted. The following table describes the available set of options:

Type Description
Literal Select this option to prevent most characters from taking on special meaning by using their literal value.
Wildcard Select this option to take advantage of all [wildcard characters](wildcard values.
Regex Select this option to use regular expressions. Regular expressions are useful for defining a pattern of characters.

WURFL capabilities

A WURFL capability refers to a category that describes mobile devices. The selected capability determines the type of mobile device description that is used to identify requests.

The following table lists WURFL capabilities and their variables for the rules engine.

Note

The following variables are supported in the Modify Client Request Header and Modify Client Response Header features.

Capability Variable Description Sample values
Brand Name %{wurfl_cap_brand_name} A string that indicates the brand name of the device. Samsung
Device OS %{wurfl_cap_device_os} A string that indicates the operating system installed on the device. IOS
Device OS Version %{wurfl_cap_device_os_version} A string that indicates the version number of the operating system installed on the device. 1.0.1
Dual Orientation %{wurfl_cap_dual_orientation} A Boolean that indicates whether the device supports dual orientation. true
HTML Preferred DTD %{wurfl_cap_html_preferred_dtd} A string that indicates the mobile device's preferred document type definition (DTD) for HTML content. none
xhtml_basic
html5
Image Inlining %{wurfl_cap_image_inlining} A Boolean that indicates whether the device supports Base64 encoded images. false
Is Android %{wurfl_vcap_is_android} A Boolean that indicates whether the device uses the Android OS. true
Is IOS %{wurfl_vcap_is_ios} A Boolean that indicates whether the device uses iOS. false
Is Smart TV %{wurfl_cap_is_smarttv} A Boolean that indicates whether the device is a smart TV. false
Is Smartphone %{wurfl_vcap_is_smartphone} A Boolean that indicates whether the device is a smartphone. true
Is Tablet %{wurfl_cap_is_tablet} A Boolean that indicates whether the device is a tablet. This description is OS-independent. true
Is Wireless Device %{wurfl_cap_is_wireless_device} A Boolean that indicates whether the device is considered a wireless device. true
Marketing Name %{wurfl_cap_marketing_name} A string that indicates the device's marketing name. BlackBerry 8100 Pearl
Mobile Browser %{wurfl_cap_mobile_browser} A string that indicates the browser that's used to request content from the device. Chrome
Mobile Browser Version %{wurfl_cap_mobile_browser_version} A string that indicates the version of the browser that's used to request content from the device. 31
Model Name %{wurfl_cap_model_name} A string that indicates the device's model name. s3
Progressive Download %{wurfl_cap_progressive_download} A Boolean that indicates whether the device supports the playback of audio and video while it is still being downloaded. true
Release Date %{wurfl_cap_release_date} A string that indicates the year and month on which the device was added to the WURFL database.

Format: yyyy_mm
2013_december
Resolution Height %{wurfl_cap_resolution_height} An integer that indicates the device's height in pixels. 768
Resolution Width %{wurfl_cap_resolution_width} An integer that indicates the device's width in pixels. 1024

Back to top



Edge Cname

Key information:

  • The list of available edge CNAMEs is limited to those edge CNAMEs that have been configured on the Edge CNAMEs page for the platform on which the rules engine is being configured.
  • Before you attempt to delete an edge CNAME configuration, make sure that an Edge Cname match condition does not reference it. Edge CNAME configurations that have been defined in a rule cannot be deleted from the Edge CNAMEs page.
  • Don't use an AND IF statement to combine certain match conditions. For example, combining an Edge Cname match condition with a Customer Origin match condition would create a match pattern that could never be matched. For this reason, two Edge Cname match conditions cannot be combined through an AND IF statement.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Referring Domain

The host name associated with the referrer through which content was requested determines whether the Referring Domain condition is met.

The Matches/Does Not Match option determines the conditions under which the Referring Domain match condition is met:

  • Matches: Requires the referring host name to match the specified values.
  • Does Not Match: Requires that the referring host name does not match the specified value.

Key information:

  • Specify multiple host names by delimiting each one with a single space.
  • This match condition supports wildcard values.
  • If the specified value does not contain an asterisk, it must be an exact match for the referrer's host name. For example, specifying "mydomain.com" would not match "www.mydomain.com."
  • Use the Ignore Case option to control whether a case-sensitive comparison is made.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Request Header Literal

The Matches/Does Not Match option determines the conditions under which the Request Header Literal match condition is met.

  • Matches: Requires the request to contain the specified header. Its value must match the one that's defined in this match condition.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified header.
    • It contains the specified header, but its value does not match the one that's defined in this match condition.

Key information:

  • Header name comparisons are always case-insensitive. Use the Ignore Case option to control the case-sensitivity of header value comparisons.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Request Header Regex

The Matches/Does Not Match option determines the conditions under which the Request Header Regex match condition is met.

  • Matches: Requires the request to contain the specified header. Its value must match the pattern that's defined in the specified regular expression.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified header.
    • It contains the specified header, but its value does not match the specified regular expression.

Key information:

  • Header name:
    • Header name comparisons are case-insensitive.
    • Replace spaces in the header name with "%20."
  • Header value:
    • A header value can take advantage of regular expressions.
    • Use the Ignore Case option to control the case-sensitivity of header value comparisons.
    • The match condition is met only when a header value exactly matches at least one of the specified patterns.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Request Header Wildcard

The Matches/Does Not Match option determines the conditions under which the Request Header Wildcard match condition is met.

  • Matches: Requires the request to contain the specified header. Its value must match at least one of the values that are defined in this match condition.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified header.
    • It contains the specified header, but its value does not match any of the specified values.

Key information:

  • Header name:
    • Header name comparisons are case-insensitive.
    • Spaces in the header name should be replaced with "%20." You can also use this value to specify spaces in a header value.
  • Header value:
    • A header value can take advantage of wildcard values.
    • Use the Ignore Case option to control the case-sensitivity of header value comparisons.
    • This match condition is met when a header value exactly matches to at least one of the specified patterns.
    • Specify multiple values by delimiting each one with a single space.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Request Method

The Request Method match condition is met only when assets are requested through the selected request method. The available request methods are:

  • GET
  • HEAD
  • POST
  • OPTIONS
  • PUT
  • DELETE
  • TRACE
  • CONNECT

Key information:

  • By default, only the GET request method can generate cached content on the network. All other request methods are proxied through the network.
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



Request Scheme

The Request Scheme match condition is met only when assets are requested through the selected protocol. The available protocols are:

  • HTTP
  • HTTPS

Key information:

  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



URL Path Directory

Identifies a request by its relative path, which excludes the file name of the requested asset.

The Matches/Does Not Match option determines the conditions under which the URL Path Directory match condition is met.

  • Matches: Requires the request to contain a relative URL path, excluding the file name, that matches the specified URL pattern.
  • Does Not Match: Requires the request to contain a relative URL path, excluding file name, that does not match the specified URL pattern.

Key information:

  • Use the Relative to option to specify whether the URL comparison starts before or after the content access point. The content access point is the portion of the path that appears between the Verizon CDN hostname and the relative path to the requested asset (for example, /800001/CustomerOrigin). It identifies a location by server type (for example, CDN or customer origin) and your customer account number.

    The following values are available for the Relative to option:

    • Root: Indicates that the URL comparison point begins directly after the CDN hostname.

      For example: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

    • Origin: Indicates that the URL comparison point begins after the content access point (for example, /000001 or /800001/myorigin). Because the *.azureedge.net CNAME is created relative to the origin directory on the Verizon CDN hostname by default, Azure CDN users should use the Origin value.

      For example: https://<endpoint>.azureedge.net/myfolder/index.htm

      This URL points to the following Verizon CDN hostname: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

  • An edge CNAME URL is rewritten to a CDN URL prior to the URL comparison.

    For example, both of the following URLs point to the same asset and therefore have the same URL path.

    • CDN URL: http://wpc.0001.<domain>/800001/CustomerOrigin/path/asset.htm

    • Edge CNAME URL: http://<endpoint>.azureedge.net/path/asset.htm

      Additional information:

    • Custom domain: https://my.domain.com/path/asset.htm

    • URL path (relative to root): /800001/CustomerOrigin/path/

    • URL path (relative to origin): /path/

  • The portion of the URL that is used for the URL comparison ends just before the file name of the requested asset. A trailing forward slash is the last character in this type of path.

  • Replace any spaces in the URL path pattern with "%20."

  • Each URL path pattern can contain one or more asterisks (*), where each asterisk matches a sequence of one or more characters.

  • Specify multiple URL paths in the pattern by delimiting each one with a single space.

    For example: */sales/ */marketing/

  • A URL path specification can take advantage of wildcard values.

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

Back to top



URL Path Extension

Identifies requests by the file extension of the requested asset.

The Matches/Does Not Match option determines the conditions under which the URL Path Extension match condition is met.

  • Matches: Requires the URL of the request to contain a file extension that exactly matches the specified pattern.

    For example, if you specify "htm", "htm" assets are matched, but not "html" assets.

  • Does Not Match: Requires the URL request to contain a file extension that does not match the specified pattern.

Key information:

  • Specify the file extensions to match in the Value box. Do not include a leading period; for example, use htm instead of .htm.

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

  • Specify multiple file extensions by delimiting each extension with a single space.

    For example: htm html

  • For example, specifying "htm" matches "htm" assets, but not "html" assets.

Sample Scenario

The following sample configuration assumes that this match condition is met when a request matches one of the specified extensions.

Value specification: asp aspx php html

This match condition is met when it finds URLs that end with the following extensions:

  • .asp
  • .aspx
  • .php
  • .html

Back to top



URL Path Filename

Identifies requests by the file name of the requested asset. For the purposes of this match condition, a file name consists of the name of the requested asset, a period, and the file extension (for example, index.html).

The Matches/Does Not Match option determines the conditions under which the URL Path Filename match condition is met.

  • Matches: Requires the request to contain a file name in its URL path that matches the specified pattern.
  • Does Not Match: Requires the request to contain a file name in its URL path that does not match the specified pattern.

Key information:

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

  • To specify multiple file extensions, separate each extension with a single space.

    For example: index.htm index.html

  • Replace spaces in a file name value with "%20."

  • A file name value can take advantage of wildcard values. For example, each file name pattern can consist of one or more asterisks (*), where each asterisk matches a sequence of one or more characters.

  • If wildcard characters are not specified, then only an exact match will satisfy this match condition.

    For example, specifying "presentation.ppt" matches an asset named "presentation.ppt," but not one named "presentation.pptx."

Back to top



URL Path Literal

Compares a request's URL path, including file name, to the specified value.

The Matches/Does Not Match option determines the conditions under which the URL Path Literal match condition is met.

  • Matches: Requires the request to contain a URL path that matches the specified pattern.
  • Does Not Match: Requires the request to contain a URL path that does not match the specified pattern.

Key information:

  • Use the Relative to option to specify whether the URL comparison point begins before or after the content access point.

    The following values are available for the Relative to option:

    • Root: Indicates that the URL comparison point begins directly after the CDN hostname.

      For example: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

    • Origin: Indicates that the URL comparison point begins after the content access point (for example, /000001 or /800001/myorigin). Because the *.azureedge.net CNAME is created relative to the origin directory on the Verizon CDN hostname by default, Azure CDN users should use the Origin value.

      For example: https://<endpoint>.azureedge.net/myfolder/index.htm

      This URL points to the following Verizon CDN hostname: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

  • An edge CNAME URL is rewritten to a CDN URL prior to a URL comparison.

    For example, both of the following URLs point to the same asset and therefore have the same URL path:

    • CDN URL: http://wpc.0001.<domain>/800001/CustomerOrigin/path/asset.htm

    • Edge CNAME URL: http://<endpoint>.azureedge.net/path/asset.htm

      Additional information:

    • URL path (relative to root): /800001/CustomerOrigin/path/asset.htm

    • URL path (relative to origin): /path/asset.htm

  • Query strings in the URL are ignored.

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

  • The value specified for this match condition is compared against the relative path of the exact request made by the client.

  • To match all requests made to a particular directory, use the URL Path Directory or the URL Path Wildcard match condition.

Back to top



URL Path Regex

Compares a request's URL path to the specified regular expression.

The Matches/Does Not Match option determines the conditions under which the URL Path Regex match condition is met.

  • Matches: Requires the request to contain a URL path that matches the specified regular expression.
  • Does Not Match: Requires the request to contain a URL path that does not match the specified regular expression.

Key information:

  • An edge CNAME URL is rewritten to a CDN URL prior to URL comparison.

    For example, both URLs point to the same asset and therefore have the same URL path.

    • CDN URL: http://wpc.0001.<domain>/800001/CustomerOrigin/path/asset.htm

    • Edge CNAME URL: http://my.domain.com/path/asset.htm

      Additional information:

    • URL path: /800001/CustomerOrigin/path/asset.htm

  • Query strings in the URL are ignored.

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

  • Spaces in the URL path should be replaced with "%20."

Back to top



URL Path Wildcard

Compares a request's relative URL path to the specified wildcard pattern.

The Matches/Does Not Match option determines the conditions under which the URL Path Wildcard match condition is met.

  • Matches: Requires the request to contain a URL path that matches the specified wildcard pattern.
  • Does Not Match: Requires the request to contain a URL path that does not match the specified wildcard pattern.

Key information:

  • Relative to option: This option determines whether the URL comparison point begins before or after the content access point.

    This option can have the following values:

    • Root: Indicates that the URL comparison point begins directly after the CDN hostname.

      For example: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

    • Origin: Indicates that the URL comparison point begins after the content access point (for example, /000001 or /800001/myorigin). Because the *.azureedge.net CNAME is created relative to the origin directory on the Verizon CDN hostname by default, Azure CDN users should use the Origin value.

      For example: https://<endpoint>.azureedge.net/myfolder/index.htm

      This URL points to the following Verizon CDN hostname: http://wpc.0001.<domain>/800001/myorigin/myfolder/index.htm

  • An edge CNAME URL is rewritten to a CDN URL prior to URL comparison.

    For example, both of the following URLs point to the same asset and therefore have the same URL path:

    • CDN URL: http://wpc.0001.<domain>/800001/CustomerOrigin/path/asset.htm

    • Edge CNAME URL: http://<endpoint>.azureedge.net/path/asset.htm

      Additional information:

    • URL path (relative to root): /800001/CustomerOrigin/path/asset.htm

    • URL path (relative to origin): /path/asset.htm

  • Specify multiple URL paths by delimiting each one with a single space.

    For example: /marketing/asset.* /sales/*.htm

  • Query strings in the URL are ignored.

  • Use the Ignore Case option to control whether a case-sensitive comparison is performed.

  • Replace spaces in the URL path with "%20."

  • The value specified for a URL path can take advantage of wildcard values. Each URL path pattern can contain one or more asterisks (*), where each asterisk can match a sequence of one or more characters.

Sample Scenarios

The sample configurations in the following table assume that this match condition is met when a request matches the specified URL pattern:

Value Relative to Result
*/test.html */test.php Root or Origin This pattern is matched by requests for assets named "test.html" or "test.php" in any folder.
/80ABCD/origin/text/* Root This pattern is matched when the requested asset meets the following criteria:
- It must reside on a customer origin called "origin."
- The relative path must start with a folder called "text." That is, the requested asset can either reside in the "text" folder or one of its recursive subfolders.
/css/ /js/ Root or Origin This pattern is matched by all CDN or edge CNAME URLs that contain a css or js folder.
*.jpg *.gif *.png Root or Origin This pattern is matched by all CDN or edge CNAME URLs ending with .jpg, .gif, or .png. An alternative way to specify this pattern is with the URL Path Extension match condition.
/images/* /media/* Origin This pattern is matched by CDN or edge CNAME URLs whose relative path starts with an "images" or "media" folder.
- CDN URL: http://wpc.0001.<domain>/800001/myorigin/images/sales/event1.png
- Sample edge CNAME URL: http://cdn.mydomain.com/images/sales/event1.png

Back to top



URL Query Literal

Compares a request's query string to the specified value.

The Matches/Does Not Match option determines the conditions under which the URL Query Literal match condition is met.

  • Matches: Requires the request to contain a URL query string that matches the specified query string.
  • Does Not Match: Requires the request to contain a URL query string that does not match the specified query string.

Key information:

  • Only exact query string matches satisfy this match condition.

  • Use the Ignore Case option to control the case-sensitivity of query string comparisons.

  • Do not include a leading question mark (?) in the query string value text.

  • Certain characters require URL encoding. Use the percentage symbol to URL encode the following characters:

    Character URL Encoding
    Space %20
    & %25
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:

    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



URL Query Parameter

Identifies requests that contain the specified query string parameter. This parameter is set to a value that matches a specified pattern. Query string parameters (for example, parameter=value) in the request URL determine whether this condition is met. This match condition identifies a query string parameter by its name and accepts one or more values for the parameter value.

The Matches/Does Not Match option determines the conditions under which the URL Query Parameter match condition is met.

  • Matches: Requires a request to contain the specified parameter with a value that matches at least one of the values that are defined in this match condition.
  • Does Not Match: Requires that the request meets either of the following criteria:
    • It does not contain the specified parameter.
    • It contains the specified parameter, but its value does not match any of the values that are defined in this match condition.

This match condition provides an easy way to specify parameter name/value combinations. For more flexibility if you are matching a query string parameter, consider using the URL Query Wildcard match condition.

Key information:

  • Only a single URL query parameter name can be specified per instance of this match condition.

  • Because wildcard values are not supported when a parameter name is specified, only exact parameter name matches are eligible for comparison.

  • Parameter value(s) can include wildcard values.

    • Each parameter value pattern can consist of one or more asterisks (*), where each asterisk can match a sequence of one or more characters.

    • Certain characters require URL encoding. Use the percentage symbol to URL encode the following characters:

      Character URL Encoding
      Space %20
      & %25
  • Specify multiple query string parameter values by delimiting each one with a single space. This match condition is met when a request contains one of the specified name/value combinations.

    • Example 1:

      • Configuration:

        ValueA ValueB

      • This configuration matches the following query string parameters:

        Parameter1=ValueA

        Parameter1=ValueB

    • Example 2:

      • Configuration:

        Value%20A Value%20B

      • This configuration matches the following query string parameters:

        Parameter1=Value%20A

        Parameter1=Value%20B

  • This match condition is met only when there is an exact match to at least one of the specified query string name/value combinations.

    For example, if you use the configuration in the previous example, the parameter name/value combination "Parameter1=ValueAdd" would not be considered a match. However, if you specify either of the following values, it will match that name/value combination:

    • ValueA ValueB ValueAdd
    • ValueA* ValueB
  • Use the Ignore Case option to control the case-sensitivity of query string comparisons.

  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:

    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Sample scenarios

The following example demonstrates how this option works in specific situations:

Name Value Result
User Joe This pattern is matched when the query string for a requested URL is "?user=joe."
User * This pattern is matched when the query string for a requested URL contains a User parameter.
Email Joe* This pattern is matched when the query string for a requested URL contains an Email parameter that starts with "Joe."

Back to top



URL Query Regex

Identifies requests that contain the specified query string parameter. This parameter is set to a value that matches a specified regular expression.

The Matches/Does Not Match option determines the conditions under which the URL Query Regex match condition is met.

  • Matches: Requires the request to contain a URL query string that matches the specified regular expression.
  • Does Not Match: Requires the request to contain a URL query string that does not match the specified regular expression.

Key information:

  • Only exact matches to the specified regular expression satisfy this match condition.

  • Use the Ignore Case option to control the case-sensitivity of query string comparisons.

  • For the purposes of this option, a query string starts with the first character after the question mark (?) delimiter for the query string.

  • Certain characters require URL encoding. Use the percentage symbol to URL encode the following characters:

    Character URL Encoding Value
    Space %20 %20
    & %25 %25

    Note that percentage symbols must be escaped.

  • Double-escape special regular expression characters (for example, ^$.+) to include a backslash in the regular expression.

    For example:

    Value Interpreted As
    \+ +
    \\+ \+
  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:

    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Back to top



URL Query Wildcard

Compares the specified value(s) against the request's query string.

The Matches/Does Not Match option determines the conditions under which the URL Query Wildcard match condition is met.

  • Matches: Requires the request to contain a URL query string that matches the specified wildcard value.
  • Does Not Match: Requires the request to contain a URL query string that does not match the specified wildcard value.

Key information:

  • For the purposes of this option, a query string starts with the first character after the question mark (?) delimiter for the query string.

  • Parameter values can include wildcard values:

    • Each parameter value pattern can consist of one or more asterisks (*), where each asterisk can match a sequence of one or more characters.

    • Certain characters require URL encoding. Use the percentage symbol to URL encode the following characters:

      Character URL Encoding
      Space %20
      & %25
  • Specify multiple values by delimiting each one with a single space.

    For example: Parameter1=ValueA ValueB Parameter1=ValueC&Parameter2=ValueD

  • Only exact matches to at least one of the specified query string patterns satisfy this match condition.

  • Use the Ignore Case option to control the case-sensitivity of query string comparisons.

  • Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:

    • Complete Cache Fill
    • Default Internal Max-Age
    • Force Internal Max-Age
    • Ignore Origin No-Cache
    • Internal Max-Stale

Sample scenarios

The following example demonstrates how this option works in specific situations:

Name Description
user=joe This pattern is matched when the query string for a requested URL is "?user=joe."
*user=* *optout=* This pattern is matched when the CDN URL query contains either the user or optout parameter.

Back to top


Next steps