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 base​_directory behavior specifies.


The action to perform on the path.


Specify the match and target_​path. For example, a match of /path1/ and a target_​path of /path1/path2/ changes /path1/page.​html to /path1/path2/page.​html.


Specify the match. For example, a match of /path2/ changes /path1/path2/page.​html to /path1/page.​html.


Specify the target_​url. For example, you can direct traffic to /error/restricted.​html.


Specify the target_​path​Prepend. For example, if set to /prefix/, /path1/page.​html changes to /prefix/path1/page.​html.


Specify the match_​regex and target_​regex. For example, specifying logo\\.(png|gif|jpe?g) and brand\$1 changes logo.​png to brand.​png.


When behavior is REMOVE or REPLACE, specifies the part of the incoming path you'd like to remove or modify.

behavior is either: REMOVE, REPLACE

When behavior is set to REGEX_​REPLACE, specifies the Perl-compatible regular expression to replace with target_​regex.

behavior is REGEX_​REPLACE
target_​regexstring (allows variables)

When behavior is set to REGEX_​REPLACE, this replaces whatever the match_​regex field matches, along with any captured sequences from \$1 through \$9.

behavior is REGEX_​REPLACE
target_​pathstring (allows variables)

When behavior is set to REPLACE, this path replaces whatever the match field matches in the incoming request's path.

behavior is REPLACE
target_​path​Prependstring (allows variables)

When behavior is set to PREPEND, specifies a path to prepend to the incoming request's URL.

behavior is PREPEND
target_​urlstring (allows variables)

When behavior is set to REWRITE, specifies the full path to request from the origin.

behavior is REWRITE

When enabled, replaces all potential matches rather than only the first.

behavior is either: REMOVE, REPLACE, REGEX_​REPLACE

When enabled, retains the original path's query parameters.

behavior is not REWRITE