For WordPress
GitHub
Home Modules Documentation FAQ Download
Docs Redirect Manager

Redirect Manager

Manage 301 and 302 redirects with hit tracking and wildcard support.

Overview

The Redirect Manager provides a simple interface for managing 301 and 302 redirects without bloating your database. All redirects are stored in a single JSON file.

Architecture

wp-content/
└── functionalities/
    └── redirects.json    # All redirects stored here

Features

FeatureDescription
Hit TrackingReal-time counter for each redirect usage
File-Based StorageHigh-performance JSON file (cached with transients)
Wildcard SupportUse * suffix for path prefix matching
Multiple TypesSupports 301, 302, 307, and 308 redirects
Enable/DisableTemporarily disable without deleting

Redirect Types

CodeTypeUse Case
301PermanentPage permanently moved (passes SEO value)
302TemporaryTemporary redirect
307Temporary RedirectPreserves request method (POST stays POST)
308Permanent RedirectPermanent version of 307

Wildcard Matching

Append * to match all URLs starting with a prefix:

From PatternMatches
/old-blog/*/old-blog/post-1, /old-blog/category/tech, etc.
/docs/v1/*/docs/v1/api, /docs/v1/guide/intro, etc.

Performance

OptimizationImplementation
Early Hooktemplate_redirect at priority 1
Admin SkipNo processing in admin area
Fast LookupExact match check before wildcard iteration
Transient Cache12-hour cache for redirect data