redirect_add
Add a redirect rule mapping a source path to a destination path, with configurable HTTP status codes (301, 302, 307, 410). Supports regex patterns and inactive rules.
Instructions
Add a redirect rule. source/destination are paths (e.g. /old → /new). redirect_type defaults to 301; allowed: 301, 302, 307, 410. Set regexp=true to treat source as a regex pattern. Set active=false to create the rule disabled. For 410 (Gone), destination is semantically meaningless — Voog still stores it but never redirects there; pass any value (e.g. source path).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site name from voog_list_sites | |
| source | Yes | Source path (e.g. /en/products/old) | |
| destination | Yes | Destination path (e.g. /en/products/new). Ignored when redirect_type=410 (Gone) — 410 returns the status without redirecting. | |
| redirect_type | No | HTTP status code: 301 (permanent), 302 (temporary), 307 (temporary, preserve method), 410 (gone — destination ignored). Default 301. | |
| active | No | Whether the rule is active. Default true. | |
| regexp | No | If true, treat 'source' as a regex pattern (Voog's regex redirect feature). Default false (literal path match). |