Redirect host (www)
Redirect to another host, keeping the path and query — add or remove www, or send aliases to one domain.
| Type | redirectHost |
| Category | Transform |
| Requires | Goma Gateway 1.2.0 or newer |
Gateway version
A route using this middleware fails to load on a gateway older than 1.2.0. Miabi does not read the running gateway's version, so nothing stops you saving it — the route is what reports the problem.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
www | one of add, remove | no | — | add: example.com → www.example.com. remove: www.example.com → example.com. |
host | text | no | — | Instead of www: send every other host on the route here. Example: example.com. |
permanent | true/false | no | — | Use 301 instead of 302. |