- Property Manager name: Modify Outgoing Request Path
- Behavior version: The
v2024-08-13
rule format supports therewriteUrl
behavior v1.3. - Rule format status: Deprecated, outdated rule format
- Access: Read/Write
- Allowed in includes: Yes
Modifies the path of incoming requests to forward to the origin. This helps you offload URL-rewriting tasks to the edge to increase the origin server's performance, allows you to redirect links to different targets without changing markup, and hides your original directory structure.
Except for regular expression replacements, this behavior manipulates path expressions that start and end with a /
character.
This behavior's rewrite operations can't override any the baseDirectory
behavior specifies.
Option | Type | Description | Requires | |
---|---|---|---|---|
behavior | enum | The action to perform on the path. | {"displayType":"enum","options":["REPLACE","REMOVE","REWRITE","PREPEND","REGEX_REPLACE"],"tag":"select"} | |
REPLACE | Specify the | |||
REMOVE | Specify the | |||
REWRITE | Specify the | |||
PREPEND | Specify the | |||
REGEX_REPLACE | Specify the | |||
match | string | When | behavior is either: REMOVE , REPLACE | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"in","value":["REMOVE","REPLACE"]}} |
matchRegex | string | When | behavior is REGEX_REPLACE | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"eq","value":"REGEX_REPLACE"}} |
targetRegex | string (allows variables) | When | behavior is REGEX_REPLACE | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"eq","value":"REGEX_REPLACE"}} |
targetPath | string (allows variables) | When | behavior is REPLACE | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"eq","value":"REPLACE"}} |
targetPathPrepend | string (allows variables) | When | behavior is PREPEND | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"eq","value":"PREPEND"}} |
targetUrl | string (allows variables) | When | behavior is REWRITE | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"behavior","op":"eq","value":"REWRITE"}} |
matchMultiple | boolean | When enabled, replaces all potential matches rather than only the first. | behavior is either: REMOVE , REPLACE , REGEX_REPLACE | {"displayType":"boolean","tag":"input","type":"checkbox"} {"if":{"attribute":"behavior","op":"in","value":["REMOVE","REPLACE","REGEX_REPLACE"]}} |
keepQueryString | boolean | When enabled, retains the original path's query parameters. | behavior is not REWRITE | {"displayType":"boolean","tag":"input","type":"checkbox"} {"if":{"attribute":"behavior","op":"neq","value":"REWRITE"}} |