Reference
pier routes
Site routing rules
pier routes <command>Site routing rules.
Subcommands
pier routes ls
pier routes ls [<site>]List a site's routing rules.
| Argument | Required | Description |
|---|---|---|
<site> | no | Site ref (name or name/target) |
pier routes add
pier routes add [<site>] [<route-type>] [flags]Add a routing rule (redirect, rewrite, header).
| Argument | Required | Description |
|---|---|---|
<site> | no | Site (name or name/target); omit to pick |
<route-type> | no | Route type (redirect, rewrite, header) |
| Flag | Value | Default | Description |
|---|---|---|---|
-y, --yes | Skip confirmation prompt | ||
--stage | Write the change to pier.yaml only — apply later with 'pier deploy' | ||
--source | STRING | Source path pattern | |
--destination | STRING | Destination path or URL | |
--status | 308 | 308 | Redirect status code (301/302/307/308) |
--path | STRING | Header rule path pattern | |
--headers | HEADERS,... | Header key=value pairs |
pier routes rm
pier routes rm [<site>] [<route-type>] [flags]Remove a routing rule.
| Argument | Required | Description |
|---|---|---|
<site> | no | Site (name or name/target); omit to pick |
<route-type> | no | Route type (redirect, rewrite, header) |
| Flag | Value | Default | Description |
|---|---|---|---|
-y, --yes | Skip confirmation prompt | ||
--stage | Write the change to pier.yaml only — apply later with 'pier deploy' | ||
--source | STRING | Source/path pattern to remove | |
--path | STRING | Header rule path to remove |
pier routes fallback
pier routes fallback [<site>] [flags]Configure the SPA fallback.
| Argument | Required | Description |
|---|---|---|
<site> | no | Site (name or name/target); omit to pick |
| Flag | Value | Default | Description |
|---|---|---|---|
-y, --yes | Skip confirmation prompt |
Global flags apply to every command.