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