URL Rewrite
Overview
The URL Rewrite action allows you to transform the URL path and query parameters of the incoming request.
Behavior
When executed, this action will replace all regex matches with the configured replacement. Before regex replacement, all named variables
will be replaced with their corresponding values.
Configuration
Parameter | | Description |
---|
from | string | A regular expression string to match inside of the URL. |
to | string | A regular expression string to replace the from match with. Also contains special named variables outside of regular regex. |
Named Variables
Keyword | Description |
---|
$args | Replaces $args with a list of "&" delimited query parameters: "args1=value1&arg2=value2&...&argn=valuen" |
$query_string | Replaces $query_string with a list of "&" delimited query parameters: "args1=value1&arg2=value2&...&argn=valuen" |
$is_args | Replaces $is_args with "?" if args are present, "" if not. |
$uri | Replaces $uri with the request URI: path?query. |
$arg_<name> | Replaces $arg_name with the value of query parameter name if it exists in the request, "" if not. name must only be comprised of digits, letters, and the "_" character. If there is more than one value assigned to name , only the first value will be substituted. |
$scheme | Replaces $scheme with the scheme of the request, either http or https . |
$host | Replaces $host with the hostname of the request. |