redirect
- Property Manager name: Redirect
- Behavior version: The
v2024-05-31
rule format supports theredirect
behavior v1.5. - Rule format status: GA, stable
- Access: Read/Write
- Allowed in includes: Yes
Respond to the client request with a redirect without contacting the origin. Specify the redirect as a path expression starting with a /
character relative to the current root, or as a fully qualified URL. This behavior relies primarily on destination_hostname
and destination_path
to manipulate the hostname and path independently.
See also the redirectplus
behavior, which allows you to use variables more flexibly to express the redirect's destination.
Option | Type | Description | Requires | |
---|---|---|---|---|
mobile_default_choice | enum | Either specify a default response for mobile browsers, or customize your own. | {"displayType":"enum","options":["DEFAULT","MOBILE"],"tag":"select"} | |
DEFAULT | Allows all other | |||
MOBILE | Allows only a 302 response code. | |||
destination_protocol | enum | Choose the protocol for the redirect URL. | {"displayType":"enum","options":["SAME_AS_REQUEST","HTTP","HTTPS"],"tag":"select"} | |
SAME_AS_REQUEST | Pass through the original protocol. | |||
HTTP | Use | |||
HTTPS | Use | |||
destination_hostname | enum | Specify how to change the requested hostname, independently from the pathname. | {"displayType":"enum","options":["SAME_AS_REQUEST","SUBDOMAIN","SIBLING","OTHER"],"tag":"select"} | |
SAME_AS_REQUEST | Preserves the hostname unchanged. | |||
SUBDOMAIN | Prepends a subdomain from the | |||
SIBLING | Replaces the leftmost subdomain with the | |||
OTHER | Specifies a static domain in the | |||
destination_hostnameSubdomain | string (allows variables) | Specifies a subdomain to prepend to the current hostname. For example, a value of | destination_hostname is SUBDOMAIN | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationHostname","op":"eq","value":"SUBDOMAIN"}} |
destination_hostnameSibling | string (allows variables) | Specifies the subdomain with which to replace to the current hostname's leftmost subdomain. For example, a value of | destination_hostname is SIBLING | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationHostname","op":"eq","value":"SIBLING"}} |
destination_hostnameOther | string (allows variables) | Specifies the full hostname with which to replace the current hostname. | destination_hostname is OTHER | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationHostname","op":"eq","value":"OTHER"}} |
destination_path | enum | Specify how to change the requested pathname, independently from the hostname. | {"displayType":"enum","options":["SAME_AS_REQUEST","PREFIX_REQUEST","OTHER"],"tag":"select"} | |
SAME_AS_REQUEST | Preserves the current path unchanged. | |||
PREFIX_REQUEST | Prepends a path with the | |||
OTHER | Replaces the current path with the | |||
destination_pathPrefix | string (allows variables) | When | destination_path is PREFIX_REQUEST | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationPath","op":"eq","value":"PREFIX_REQUEST"}} |
destination_pathSuffixStatus | enum | When | destination_path is PREFIX_REQUEST | {"displayType":"enum","options":["NO_SUFFIX","SUFFIX"],"tag":"select"} {"if":{"attribute":"destinationPath","op":"eq","value":"PREFIX_REQUEST"}} |
NO_SUFFIX | Specify if you want to preserve the end of the path unchanged. | |||
SUFFIX | The | |||
destination_pathSuffix | string (allows variables) | When | destination_pathSuffixStatus is SUFFIX | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationPathSuffixStatus","op":"eq","value":"SUFFIX"}} |
destination_pathOther | string (allows variables) | When | destination_path is OTHER | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"destinationPath","op":"eq","value":"OTHER"}} |
query_string | boolean | When set to | {"displayType":"boolean","tag":"input","type":"checkbox"} | |
response_code | enum | Specify the redirect's response code. | {"displayType":"enum","options":["301","302","303","307"],"tag":"select"} | |
Supported values: 301 302 303 307 |
Updated 17 days ago