Skip to content

Target Templates

The target template is the URL the visitor is redirected to. It supports {token} placeholders that are replaced at runtime.

Available tokens

Request tokens

Token Value
{Host} Request host, e.g. example.com
{Path} Request path, e.g. /shop/product/42
{Query} Raw query string (without ?), e.g. lang=nl&ref=email
{Scheme} http or https
{Ip} Client IP address

Extract tokens

Any extract defined on the rule is available as {extractName}.

Examples

Redirect to a different domain, preserving path and query:

https://new.example.com{Path}?{Query}

Redirect using a mapped value:

With an extract named targetUrl that resolves via Map("products", Segment(Path, 1)):

https://shop.example.com/product/{targetUrl}

Reconstruct the URL with a language prefix stripped:

With an extract named rest capturing the path after the language segment:

https://example.com/{rest}

Forward only the query string:

https://example.com/landing?{Query}

Token resolution order

  1. Extract names are checked first.
  2. If no extract matches the token name, the built-in request tokens are used.
  3. If neither matches, the token resolves to "".

Note

Tokens are case-sensitive. {path} and {Path} are different.