INTEGRITY Cloudflare Docs

Single Redirects settings

The following sections describe the settings of redirect rules to configure static and dynamic URL redirects.

Wildcard URL Redirect

Performs a URL redirect using wildcard patterns to match multiple requests. This method simplifies defining source and target URL patterns without needing complex expressions.

A wildcard URL redirect has the following configuration parameters:

API information

Wildcard URL redirects are regular dynamic URL redirects that use the wildcard_replace() function in the target_url.expression parameter.

The full syntax of the "action_parameters" field for a redirect rule performing a wildcard URL redirect is the following:

"action_parameters": {
  "from_value": {
    "target_url": {
      "expression": "wildcard_replace(http.request.full_uri, r\"<REQUEST_URL_PATTERN>\", r\"<TARGET_URL_PATTERN>\")"
    },
    "status_code": <STATUS_CODE>,
    "preserve_query_string": <BOOLEAN_VALUE>
  }
}

The required parameters are <REQUEST_URL_PATTERN> and <TARGET_URL_PATTERN>.

The optional parameters can have the following values:

Static URL redirect

Performs a static URL redirect with a given HTTP status code and optionally preserves the query string.

A static URL redirect has the following configuration parameters:

API information

The full syntax of the "action_parameters" field for a redirect rule performing a static URL redirect is the following:

"action_parameters": {
  "from_value": {
    "target_url": {
      "value": "<STATIC_URL_VALUE>"
    },
    "status_code": <STATUS_CODE>,
    "preserve_query_string": <BOOLEAN_VALUE>
  }
}

The only required parameter is <STATIC_URL_VALUE>.

The optional parameters can have the following values:

Dynamic URL redirect

Performs a dynamic URL redirect, where the target URL is determined by an expression. You can configure the redirect HTTP status code and whether to preserve the query string when redirecting.

A dynamic URL redirect has the following configuration parameters:

API information

The full syntax of the "action_parameters" field for a redirect rule performing a dynamic URL redirect is the following:

"action_parameters": {
  "from_value": {
    "target_url": {
      "expression": "<DYNAMIC_URL_EXPRESSION>"
    },
    "status_code": <STATUS_CODE>,
    "preserve_query_string": <BOOLEAN_VALUE>
  }
}

The only required parameter is <DYNAMIC_URL_EXPRESSION>.

The optional parameters can have the following values: