Redirections syntax
The line format for URL redirections — regex matching, status codes, capture groups — and where they are actually written.
Redirections map old URLs to new ones at request time. They are a settings surface of their own, edited in the back-office — not a key inside miscellaneous: the API rejects a redirections key there outright (422, "A Settings config can't have a 'redirections' property"). The value is a block of space-separated lines, not a YAML list of objects. One redirection per line.
Line format
matchingUri redirectionUrl redirectionCode
| Field | Required | Notes |
|---|---|---|
matchingUri |
yes | A regex. If it contains :// it matches the full URL (cross-domain); otherwise it matches the URI only (same-host path). |
redirectionUrl |
yes | Destination. May reference capture groups from matchingUri. |
redirectionCode |
no | HTTP status. Default 301. Allowed: 300, 301, 302, 303, 307, 308. |
- Fields are space-separated; one redirection per line.
- Blank lines and
#comments are tolerated. - Capture groups:
(.*)inmatchingUriis referenced as{$1},{$2}, … inredirectionUrl.
Examples
/url1 /url2
/url3 /url4 302
/mypage/[a-z]+ /urlB
/dynamic/url/[0-9]+/[0-9]+/(.*)$ /new/url/{$1} 301
https?://fr.domain.com/contact https://www.domain.com/fr/contact # absolute dest avoids loops
The last line shows a cross-domain match (:// present) with an absolute destination, which avoids redirect loops.
Writing redirections
There is no API write path for redirections. Measured, not assumed:
update-settings-partialonly accepts the collection-shaped configs (page-types,content-types,item-set-types) — nomiscellaneous, noredirections.update-settingonmiscellaneousrejects aredirectionskey with a 422 validation error.- No CLI command and no other MCP tool targets them.
Redirections are edited by a human in the back-office. An agent asked to set them up composes the lines — that part it does well — and hands them over to be pasted.
The screen lives at Content management → Redirections, between Routes and Dictionnary: one numbered text area, a Save that applies the whole block. See Set up redirections for the screenshot and the composing rules.
quilium run does not evaluate redirections — a source path that redirects in production answers 404 locally. Whatever you want to verify about regex flavour, capture groups or status codes has to be verified against the served site.Related
Last updated September 6, 2026.