Linux 软件免费装
Banner图

Redirection Manager

开发者 dropndot
更新时间 2026年11月26日 15:08
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

redirect 301 redirect headless graphql 410 gone

下载

1.0.0 2.0.0 2.0.1 2.0.2

详情介绍:

Redirection Manager manages redirects for both classic WordPress sites and headless setups built with Next.js, Nuxt.js, React and other JavaScript frameworks. Create and search global redirects from a clean admin screen, set per-post redirects from the editor, watch real front-end 404s, test how a URL resolves, and expose everything to your frontend over a REST API or GraphQL. Redirects are stored in a dedicated database table and resolved early on each front-end request, with object caching for fast lookups on sites that use a persistent cache such as Redis or Memcached. Note: The WPGraphQL plugin is required only for the GraphQL features. Everything else works without it. Key Features Redirect management Post-level redirects Headless & API GraphQL Monitoring & tools Supported redirect types

安装:

  1. Upload the plugin files to /wp-content/plugins/redirection-manager, or install the plugin through the WordPress Plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. (Optional) Install and activate WPGraphQL if you want the GraphQL features.
  4. Go to Tools → Redirect Manager to add and manage redirects. (The old Settings → Redirect Manager address redirects there.)
  5. (Optional) Set per-post redirects from the "Redirect Settings" meta box in the post editor.

屏幕截图:

  • The 404 Log tab: genuine front-end 404s with hit counts and suggested redirects you can create with one click.
  • The Tester & Import tab: the redirect tester showing each hop of a redirect, plus CSV import with a dry-run preview.
  • The Settings tab: analytics, 404-log retention, REST read-endpoint authentication, the per-site API token, headless exports and signed webhooks.

升级注意事项:

3.0.0 Adds a REST API, headless exports, ETags, token-secured 404 reporting and signed webhooks. No database changes; existing features are unchanged. 2.3.0 Adds redirect hit counts, a 404 log with suggestions, a redirect tester, CSV import and automatic redirects for changed post URLs. The database upgrade only adds columns and a table; existing redirects are not changed. 2.2.0 Faster redirect lookups with object caching, bulk enable/disable/status changes, sortable columns and multisite support. No database changes. 2.1.0 Fixes external and query-string redirects and adds 302/307. Your redirects table is backed up automatically before the database upgrade; nothing is deleted. The admin screen moves to Tools → Redirect Manager. 2.0.2 Security-hardening update for admin redirect list database queries. Recommended for all users. 2.0.0 Major update with new redirect types (301, 308, 410), post-level redirects, CSV export, content management features and enhanced GraphQL integration. 1.0.0 Initial version.

常见问题:

How do I use the redirects on a headless frontend with GraphQL?

Query the redirectionManager field to get enabled global redirects (newest first, up to 5,000 per request; use the limit and offset arguments to page through more). Each redirect exposes id, sourceUrl, destinationUrl, statusCode and queryMode. You can also query individual posts for the redirectType and redirectUrl fields. Fragments written against the 1.0.0 RedirectionManager type still work.

How do I use the REST API from a headless frontend?

  • GET /wp-json/redirection-manager/v1/lookup?path=/old-page/ resolves one URL exactly as the site does (post-level redirects first) and returns matched, status_code, destination (a path for internal targets, a full URL for external ones), query_mode and the matching rule or post ID.
  • GET /redirects?per_page=1000&page=1 lists enabled redirects; GET /version returns the current rules version.
  • Every GET response carries an ETag; send it back as If-None-Match to get a 304 Not Modified with no database work.
  • POST /404 with path (and an optional referrer) records a 404 seen by your frontend. Send the API token from Tools → Redirect Manager → Settings as X-RM-Token: <token> or Authorization: Bearer <token>.
  • POST /redirects, PUT/PATCH/DELETE /redirects/<id> and GET /redirects?status=all require an administrator (for example via an application password).
  • Read endpoints are public by default, like the GraphQL list. Enable "Require authentication for read endpoints" in Settings to require an administrator or the API token.

Which redirects can each export format express?

  • Next.js and Vercel: 301/302/307/308, including exact query-string rules; 404 and 410 rules are not exported.
  • Netlify: 301/302/307/308 without query-string rules.
  • Nginx: all status codes, without query-string rules.
Every export and the Tester & Import tab list the rules that were left out and why.

How do I verify a webhook?

Each delivery sends X-RM-Timestamp, X-RM-Delivery and X-RM-Signature: sha256=<hex>, where the signature is HMAC-SHA256 of timestamp + "." + delivery + "." + raw body using your signing secret. Compare in constant time, reject timestamps older than 5 minutes, and ignore delivery IDs you have already processed. Failed deliveries are retried.

Can I redirect to another website?

Yes. Enter a full URL starting with https:// or http:// as the destination. A path such as /new-page/ redirects within your own site.

How are query strings handled?

A source without a query string matches any query string. New redirects pass the visitor's query string (for example ?utm_source=newsletter) on to the destination; choose "Ignore" to drop it. Redirects created before 2.1.0 keep their previous behaviour. To match one specific query string, include it in the source, for example /page/?id=5.

Can I customize the 410 page?

Yes. Add redirection-manager-410.php (or 410.php) to your theme, or use the redirection_manager_410_template filter.

Is my data deleted when I deactivate or delete the plugin?

No. Deactivating never deletes anything, and deleting the plugin keeps your redirects unless you first enable "Delete all redirect data when the plugin is uninstalled" under Tools → Redirect Manager.

What happens to my redirects when I upgrade from 1.0.0 or 2.0.x?

The plugin copies your redirects table to a backup table before upgrading it. Nothing is deleted. Rules that cannot be used as-is (duplicates, unsupported status codes or invalid URLs) are disabled and marked "Needs review" so you can fix them. Once everything checks out, delete the backup table from the notice on the Redirect Manager screen.

Does it work with WooCommerce?

Yes. The post-level redirect meta box appears on WooCommerce products, and related-content detection recognizes product URLs.

更新日志:

3.0.0 2.3.0 2.2.0 2.1.0 2.0.2 2.0.1 2.0.0 1.0.0