rank-math/export-redirections exports active redirections as JSON, Apache .htaccess rules, or an Nginx server block.
It generates text. It never writes to a server configuration file.
At a glance
| Ability | rank-math/export-redirections |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Redirections & 404s |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
A Rank Math redirection is evaluated in PHP, which means every redirected request loads WordPress first. On a site with heavy redirect traffic — after a migration, or where an old URL structure is still widely linked — that is a full bootstrap to produce a thirty-byte response.
The same rules in the web server’s configuration are evaluated before PHP runs at all. The redirect costs almost nothing.
The trade is that server rules are not managed from WordPress. They do not appear in the redirection list, they are not counted in the hit statistics, and changing them means editing configuration and reloading the server.
Sources with an invalid regular expression are reported in the warnings and — matching Rank Math’s own behaviour — commented out in the Apache output and omitted from the Nginx one. A regex that is valid in PHP is not necessarily valid to the web server.
Nothing is written. The output is text for a person to review and install.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
format | string | No — defaults to json | json, apache or nginx. |
What comes back
| Name | Type | What it is |
|---|---|---|
output | string | The generated text. |
warnings | array | Sources with an invalid regular expression. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Give me these redirects as Nginx rules.
It resolves to one call:
{
"ability": "rank-math/export-redirections",
"parameters": {
"format": "nginx"
}
}Worth knowing
- Generates text only. No configuration file is touched.
- Active rules only.
- Invalid regexes are commented out in Apache output and omitted from Nginx.
- Server-level rules leave WordPress unaware of them. That is the trade.
Related abilities
- List Rank Math Redirections — see what will be exported
- Delete Rank Math Redirections — export before deleting
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category