Create a redirect
Log in to add to favouritesPage last updated 04 July 2024
POST/api/management/projects/{project}/redirects/
Parameters
| Name | Parameter type | Type | Description |
|---|---|---|---|
| projectId(required) | path | string | The project identifier found in the project overview screen of the management console. |
| redirect(required) | body | object | The redirect to create |
Responses
Examples
{
"sourceDomain": "example.com",
"destination": "/new-path",
"statusCode": 301,
"match": {
"type": "beginsWith",
"value": "/old-path"
}
}{
"sourceDomain": "example.com",
"destination": "/exact-destination",
"statusCode": 301,
"match": {
"type": "exactMatch",
"value": "/specific-path"
}
}{
"sourceDomain": "example.com",
"destination": "/regex-destination",
"statusCode": 301,
"match": {
"type": "regex",
"value": "^/products/(.*)$"
}
}{
"sourceDomain": "example.net",
"destination": "/updated-path",
"statusCode": 302,
"appendSourcePathToDestination": true,
"match": {
"type": "beginsWith",
"value": "/start-here"
}
}{
"sourceDomain": "example.org",
"destination": "/temporary-redirect",
"statusCode": 302,
"match": {
"type": "exactMatch",
"value": "/temporary-path"
}
}