30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Export Rank Math Redirections

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

Abilityrank-math/export-redirections
ToolsetRank Math — toolset/rank-math
GroupRank Math › Redirections & 404s
RequiresRank Math SEO, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
formatstringNo — defaults to jsonjson, apache or nginx.

What comes back

NameTypeWhat it is
outputstringThe generated text.
warningsarraySources with an invalid regular expression.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading