Create redirect
Create a new redirect for your site.
POST/api/servers/{server}/sites/{site}/redirects
Create redirect
This endpoint allows you to create a new redirect for your site.
Required parameters
- Name
redirect_from- Type
- string
- Description
The path where you want to redirect from.
- Name
redirect_to- Type
- string
- Description
The path where you want to redirect to.
- Name
type- Type
- string
- Description
The redirect type. Options:
permanent,redirect.
Request
POST
/api/servers/{server}/sites/{site}/redirectscurl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/redirects" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"redirect_from": "/",
"redirect_to": "/home",
"type": "permanent"
}'
Response
{
"data": {
"id": 1,
"status": "created",
"redirect_from": "/",
"redirect_to": "/home",
"type": "permanent"
}
}