redirectplus

Version: v2025-01-13Includes use: Yes

Behavior name: Redirect Plus

Respond to the client request with a redirect without contacting the origin. This behavior fills the same need as redirect, but allows you to use variables to express the redirect destination's component values more concisely.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "redirectplus" {
  rules_v2025_02_18 {
    name     = "Redirect Plus"
    comments = "Responds to the client request with a redirect without contacting the origin."
    behavior {
      redirectplus {
        enabled       = true
        destination   = "{{builtin.AK_SCHEME}}://{{builtin.AK_HOST}}{{builtin.AK_PATH}}"
        response_code = 302
      }
    }
  }
}
"behaviors": [
  {
    "name": "redirectplus",
    "options": {
      "enabled": true,
      "destination": "{{builtin.AK_SCHEME}}://{{builtin.AK_HOST}}{{builtin.AK_PATH}}",
      "responseCode": 302
    }
  }
]

Options

Option Description
enabled
Enables the redirect feature.
destination
Specifies the redirect as a path expression starting with a / character relative to the current root, or as a fully qualified URL. Optionally inject variables, as in this example that refers to the original request's filename: /path/to/{{builtin.AK_FILENAME}}.
response_code
Assigns the status code for the redirect response. Value is one of:
  • 301
  • 302
  • 303
  • 307