Skip to main content
Version: vNext (upcoming release)

Redirect

Summary

The Redirect setting redirects incoming requests to a new URL.

How to configure

Either redirect or to must be set.

YAML/JSON settingTypeUsage
redirectobjectoptional

Examples

redirect: {'host_redirect': 'example.com'}

Redirect options

The redirect field is an object with the following options:

OptionsTypeDefinition
https_redirectbooleanThe incoming scheme will be swapped with "https".
scheme_redirectstringThe incoming scheme will be swapped with the given value.
host_redirectstringThe incoming host will be swapped with the given value.
port_redirectintegerThe incoming port will be swapped with the given value.
path_redirectstringThe incoming path portion of the URL will be swapped with the given value.
prefix_rewritestringThe incoming matched prefix will be swapped with the given value.
response_codeintegerThe response code to use for the redirect. Defaults to 301.
strip_querybooleanIndicates that during redirection, the query portion of the URL will be removed. Defaults to false.