# Reference: runtime type redirect

URL: https://scalws.com/docs/reference/runtime-redirect/
Source: `docs/reference/schema` in the ScalWS repository

<h3 id="tenants-.applications-.routes-.runtime.redirect.host"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.host</code></h3>

| | |
|---|---|
| Syntax | `host: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's host; unset: taken from the request.


<h3 id="tenants-.applications-.routes-.runtime.redirect.keep_path"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.keep_path</code></h3>

| | |
|---|---|
| Syntax | `keep_path: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Append the request's path and query to `to`.


<h3 id="tenants-.applications-.routes-.runtime.redirect.path"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.path</code></h3>

| | |
|---|---|
| Syntax | `path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's path; unset: taken from the request.


<h3 id="tenants-.applications-.routes-.runtime.redirect.port"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.port</code></h3>

| | |
|---|---|
| Syntax | `port: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's port; unset: the well-known port of a configured `scheme`, else taken from the request.


<h3 id="tenants-.applications-.routes-.runtime.redirect.prefix"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.prefix</code></h3>

| | |
|---|---|
| Syntax | `prefix: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the matched prefix of the request's path; unset: taken from the request.


<h3 id="tenants-.applications-.routes-.runtime.redirect.scheme"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.scheme</code></h3>

| | |
|---|---|
| Syntax | `scheme: http \| https` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's scheme; unset: taken from the request.


<h3 id="tenants-.applications-.routes-.runtime.redirect.status"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.status</code></h3>

| | |
|---|---|
| Syntax | `status: <integer>` |
| Default | `301` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

301, 302, 303, 307 or 308.


<h3 id="tenants-.applications-.routes-.runtime.redirect.to"><code>tenants[].applications[].routes[].runtime&lt;redirect&gt;.to</code></h3>

| | |
|---|---|
| Syntax | `to: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: redirect)` |
| Reload | applies on reload |

Target origin, e.g. `https://example.com`: scheme and host (and port), no path when `keep_path` is on. Alternative to the fields `scheme`, `host`, `port`, `path` and `prefix`.


<h3 id="tenants-.applications-.runtime.redirect.host"><code>tenants[].applications[].runtime&lt;redirect&gt;.host</code></h3>

| | |
|---|---|
| Syntax | `host: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's host; unset: taken from the request.


<h3 id="tenants-.applications-.runtime.redirect.keep_path"><code>tenants[].applications[].runtime&lt;redirect&gt;.keep_path</code></h3>

| | |
|---|---|
| Syntax | `keep_path: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Append the request's path and query to `to`.


<h3 id="tenants-.applications-.runtime.redirect.path"><code>tenants[].applications[].runtime&lt;redirect&gt;.path</code></h3>

| | |
|---|---|
| Syntax | `path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's path; unset: taken from the request.


<h3 id="tenants-.applications-.runtime.redirect.port"><code>tenants[].applications[].runtime&lt;redirect&gt;.port</code></h3>

| | |
|---|---|
| Syntax | `port: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's port; unset: the well-known port of a configured `scheme`, else taken from the request.


<h3 id="tenants-.applications-.runtime.redirect.prefix"><code>tenants[].applications[].runtime&lt;redirect&gt;.prefix</code></h3>

| | |
|---|---|
| Syntax | `prefix: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the matched prefix of the request's path; unset: taken from the request.


<h3 id="tenants-.applications-.runtime.redirect.scheme"><code>tenants[].applications[].runtime&lt;redirect&gt;.scheme</code></h3>

| | |
|---|---|
| Syntax | `scheme: http \| https` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Replaces the request's scheme; unset: taken from the request.


<h3 id="tenants-.applications-.runtime.redirect.status"><code>tenants[].applications[].runtime&lt;redirect&gt;.status</code></h3>

| | |
|---|---|
| Syntax | `status: <integer>` |
| Default | `301` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

301, 302, 303, 307 or 308.


<h3 id="tenants-.applications-.runtime.redirect.to"><code>tenants[].applications[].runtime&lt;redirect&gt;.to</code></h3>

| | |
|---|---|
| Syntax | `to: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: redirect)` |
| Reload | applies on reload |

Target origin, e.g. `https://example.com`: scheme and host (and port), no path when `keep_path` is on. Alternative to the fields `scheme`, `host`, `port`, `path` and `prefix`.
