Warning
This document has not been updated for a while now. It may be out of date.
Last updated:
31 Oct 2022
content-store: # Redirect items
Redirect items
To represent content that can be found under a different base_path
, the content store will support
items with a schema_name of "redirect". These items have slightly different rules:
- They must include a redirect for the
base_path
in their redirects array. They may additionally include other paths under thebase_path
. - The
routes
array andrendering_app
will be ignored, and should be left empty. - A title is not required.
For example, given the following request:
PUT /content/moved-foo
{
"schema_name": "redirect",
"document_type": "redirect",
"publishing_app": "publisher",
"redirects": [
{"path": "/moved-foo", "type": "prefix", "destination": "/new-foo"},
{"path": "/moved-foo.json", "type": "exact", "destination": "/api/moved-foo.json"}
]
}
The following redirects would be created:
/moved-foo (prefix) => /new-foo
/moved-foo.json (exact) => /api/moved-foo.json