YouNeed.dev — home
Yavor ZagorskiSenior WordPress / PHP Engineer
CV
← WordPress engineering

VTX Redirect / WordPress plugin / PHP

A URL changes.
The decision shouldn’t.

I built a WordPress tool for the part that follows a URL change: deciding precisely where the next request goes.

Exact-path redirects, managed inside WordPress.
Source reviewed: v2.1.1.

01 / Runtime contract

One request.
One explicit outcome.

The runtime joins WordPress at template_redirect, before template output. Administration, AJAX and cron requests are left alone.

Read the behavior · illustrative scenarios, not a live plugin

  1. 01 / Request/old-page/?ref=guide
  2. 02 / Normalize path/old-page
  3. 03 / Enabled rulesExact enabled match
  4. 04 / Outcome301 → /new-page?ref=guide

Illustrative rule: /old-page → /new-page. Query preservation is on; the destination has no query of its own.

template_redirect → Normalizer → Repository → wp_safe_redirect

Source-derived flow. This diagram does not send requests or change rules.

02 / Operator control

A rule you can
actually inspect.

Source, destination, status and enabled state stay visible together. Changing a URL shouldn’t require editing a theme or scattering redirect logic through it.

VTX Redirect administration showing an enabled exact-path redirect
Real interface · rule administration. Open to inspect at full size.

Control plane / Runtime

Save deliberately.
Resolve consistently.

Permission before persistence
Administration requires manage_options and action-specific nonce validation.
Normalize once per request
The repository caches normalized rules within the request. Enabled rules are keyed by source path for matching.
Destination is a decision
301, 302, 307 or 308. Preserve the incoming query only when configured and the target has no query already.
Real VTX Redirect new-rule drawer with source, destination, status and active controls
Detail crop · the actual new-rule drawer

03 / Several changes, one workspace

A readable
migration list.

The bulk editor uses one rule per line. An administration activity log records changes; the usage lookup searches WordPress post text for references.

It is not a traffic analytics engine or a complete scan of builder metadata. Bulk input needs review: malformed lines can be skipped.

Actual VTX Redirect bulk editor with its line-based rule format
Real interface · bulk replacement, not an invented code sample

Engineering includes knowing the limits

Predictable doesn’t
mean unlimited.

What is implemented

Exact-path matching; paused rules excluded from runtime; duplicate checks in individual editing; relative-path cycle validation; WordPress safe-redirect handling with configured destination hosts.

Inspect the source

What I would harden next

Absolute same-site cycles need broader graph validation. Bulk edits need the same destination validation as individual edits. Rules live in one option, so large rule sets need measurement—not an unqualified performance claim.