A page moves, a product is retired, a URL changes — and the old address starts returning 404s for visitors and search engines.
redirects/create-redirect points that old URL wherever you want, through the Redirection plugin’s own model — so the redirect’s URL matching, flags and cache flush all run and it actually fires.
At a glance
| Ability | redirects/create-redirect |
| Toolset | Redirection — toolset/redirection |
| Group | Redirection |
| Requires | Redirection, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — calling it twice creates two redirects |
| Ships in | AcrossAI Abilities Manager 0.0.43 and later |
How it works
Pass a source URL and what to do with it. The common case is a permanent redirect: action_type url with action_code 301 and a target.
It also supports 302, 307 and 308 redirects, an error action that returns 404 or 410 with no target, pass to serve the target without changing the URL, random to a random post, and nothing to only log. Leave match_type as url for the common case, or set regex true for a pattern source.
The action type and HTTP code must agree — a redirect needs a 3xx code and a target; an error needs a 4xx/5xx code and no target — and the combination is checked before anything is written.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
source | string | Yes | The source URL or path to match, e.g. /old-page. |
target | string | No | Where to send the request. Required for url and pass actions. |
action_type | string | No | url (redirect), error, pass, random or nothing. Default url. |
action_code | integer | No | HTTP status. Defaults to 301 for a url action, 410 for an error action. |
match_type | string | No | How to match the request. Default url. |
group_id | integer | No | Group to place it in. Defaults to the last-used group. |
regex | boolean | No | Treat the source as a regular expression. |
title | string | No | Optional human label. |
What comes back
| Name | Type | What it is |
|---|---|---|
id | integer | The new redirect’s id. |
redirect | object | The created redirect: source, target, code, group, match and action type, enabled state. |
success | boolean | Whether the call completed. |
message | string | A one-line summary suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a mismatched action and code. |
Example
Ask your assistant:
Redirect /old-pricing to /pricing permanently.
It resolves to one call:
{
"ability": "redirects/create-redirect",
"parameters": {
"source": "/old-pricing",
"target": "/pricing",
"action_code": 301
}
}Worth knowing
- Not idempotent — calling it twice creates two redirects. Check first with List Redirects.
- The redirect is created through Redirection’s own model, so a raw database write that would store a redirect that never fires is never used.
- Needs the Redirection plugin active; without it you get a clear “not active” message rather than an error.
Related abilities
- List 404 Errors — the URLs that need a redirect
- List Redirects — see what already exists
- List Redirect Groups — pick a group for the redirect
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category