The list of dynamic variables in the Edge Rule redirect URL

Some of the Edge Rule actions allow you to use dynamic variables to perform advanced redirection, header manipulation and similar logic at the edge. The following variables are supported within the platform:

{{path}}

The {{path}} variable is replaced with the full request path including the query strings. The typical use case is in redirection or change origin rules.

Example value:

/my/directory/file.jpg?x=1&t=2

{{hostname}}

The {{hostname}} variable provides the full hostname that the request was sent towards.

Example value:

test.b-cdn.net

{{country_code}}

The {{country_code}} variable contains the country code of the requester's IP address.

Example value:

US

{{query_string}}

The {{query_string}} variable is replaced with the full query string of a request, excluding a leading question mark.

Example value:

x=1&t=2

{{request_method}}

The {{request_method}} variable is replaced with the request method that the request used.

Example value:

POST

{{file_name}}

The {{file_name}} variable contains the file name from the request URL. In other words, it contains the last part after the final slash and excludes query strings.

Example value:

file.jpg

  Advanced Variables

Additional advanced variables are described and documented in our Documentation section.

Table of Contents

Was this article helpful?
13 out of 39 found this helpful