=== Luminos Redirect & 404 Manager ===
Contributors: luminosagency
Author URI: https://luminosagency.com
Tags: redirects, 404, redirect manager, 301, seo
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.8
Stable tag: 0.6.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Fix 404s, don't just log them. A fast, modern redirect manager with smart destination suggestions from your own content.

== Description ==

Most redirect plugins query the database on every page load and let their 404
log grow without bound. Luminos Redirect & 404 Manager does neither.

* **Fast runtime.** Active rules are compiled into a cached map, so a normal
  page view never hits the database for redirect logic. The redirect logic only
  runs on a genuine 404 — it can never shadow a URL that actually resolves.
* **A 404 log that won't bloat your database.** 404s are aggregated by path
  (not per request) and capped, with the oldest unresolved entries pruned
  automatically.
* **Smart destination suggestions.** For any logged 404, get the best-matching
  destination from your published content and turn it into a 301 in one click.
* **Auto slug-change redirects.** Rename a published post or page and the old
  URL is redirected to the new one automatically.
* **Exact and regex rules.** 301 / 302 / 307 / 308, with loop protection.
* **Edit, search, and CSV import/export.** Manage redirects at scale and
  migrate in from another plugin.
* **One-click migration.** Import an Apache .htaccess (Redirect / RedirectMatch
  / RewriteRule) or a CSV from Redirection, Rank Math, or anywhere — columns are
  matched by name and the format is auto-detected.

= Trademarks =

WordPress is a registered trademark of the WordPress Foundation. WooCommerce is
a trademark of Automattic Inc. Luminos Agency is not affiliated with, endorsed
by, or sponsored by the WordPress Foundation or Automattic Inc.; these names are
used only to describe compatibility.

== Installation ==

1. Upload the `luminos-redirect-manager` folder to `/wp-content/plugins/`.
2. Activate the plugin through the *Plugins* screen.
3. Open *Redirects* in the admin menu.

== Frequently Asked Questions ==

= Will a redirect ever override a page that exists? =

No. Redirects are evaluated only when WordPress determines a request is a 404,
so a rule can only ever rescue a dead path.

= Does the 404 log slow my site down or fill my database? =

404s are recorded asynchronously on shutdown, aggregated by path, and capped to
a configurable maximum (default 1,000 distinct paths).

== Changelog ==

= 0.6.2 =
* Performance: importing a large redirect set no longer rebuilds the rule cache
  once per row (the compiled map is now rebuilt a single time after the batch).
* Hardening: exported CSV cells are guarded against spreadsheet formula
  injection, and CSV import is compatible with PHP 8.4.
* Portability: the 404 path no longer assumes the mbstring extension or the
  fnmatch() function are present (both fall back gracefully), so the plugin
  runs on hosts that ship without them.

= 0.6.1 =
* Third-party admin notices are now hidden on the Redirects screen for a clutter-free workspace.

= 0.6.0 =
* Release hardening: added a translation template (languages/*.pot) so the
  plugin can be localized, and a WordPress integration test suite
  (PHPUnit / wp-env).

= 0.5.1 =
* Import is now a drag-and-drop zone — drop a file onto it or click to browse,
  with the chosen filename shown.

= 0.5.0 =
* Migration importer: import an Apache .htaccess (Redirect, RedirectMatch, and
  redirect-flagged RewriteRule) or a CSV from Redirection / Rank Math / any
  source — CSV columns are matched by name, and the format is auto-detected.
* `wp lrm import <file> [--format=auto|csv|htaccess]`.

= 0.4.1 =
* Fix: `wp lrm add` now accepts an empty destination for `--code=410` (Gone),
  matching the admin UI.

= 0.4.0 =
* Query-string forwarding: the incoming query is carried to the destination
  (/old?utm=x → /new?utm=x) unless the rule sets its own.
* New 410 Gone status for permanently removed URLs.
* Auto-handle a trashed/deleted published post (410 it or redirect home).
* Destination autocomplete: search your posts/pages instead of typing paths.
* URL tester: paste a path and see which rule matches and where it'd send.
* Don't-log ignore list (simple * wildcards) to keep noise out of the 404 log.
* 404-log CSV export and a `wp lrm logs` command.
* Warns when another redirect plugin is active (double-handling risk).

= 0.3.1 =
* Fix: the admin tab navigation, status notices, and page title rendered
  unstyled (the stylesheet used the wrong class prefix). Now properly styled.

= 0.3.0 =
* Bulk actions on both lists: enable/disable/delete redirects, ignore/delete
  404s, with select-all and a delete confirmation.
* At-a-glance stat band (redirects, redirected hits, open 404s, top 404).
* Warns when a new redirect's source currently resolves to a live page (it
  would never fire, since the runtime is 404-gated).
* WP-CLI: wp lrm list / add / delete / export / import / prune.

= 0.2.0 =
* Edit existing redirects (change source, destination, type, or status code).
* Regex rules can now be created from the UI, not just the API.
* Search + pagination on both the redirects list and the 404 log.
* CSV import (migrate from another plugin) and export, with per-row isolation
  so a single bad row never aborts the batch.
* "Ignore" action for noise 404s you don't want to redirect.

= 0.1.2 =
* 404-log pruning now evicts in priority order (resolved, then lowest-hit, then
  stalest) so high-traffic broken links survive a cap squeeze or a unique-URL
  flood instead of being evicted by historical/spam rows.
* Automatic slug-change redirects now flatten chains: renaming A→B then B→C
  collapses /A → /B → /C into a single /A → /C hop.

= 0.1.1 =
* Hardening: the compiled rule cache is no longer autoloaded (read only on a
  404), 404-log pruning moved to a daily cron with a sampled inline safety net
  so unique-URL floods can't balloon the table, redirect targets are stripped of
  control characters on save, and the prune cron is cleaned up on
  deactivation/uninstall.

= 0.1.0 =
* Initial release: managed 301/302/307/308 redirects (exact + regex),
  is_404()-gated runtime with a cached rule map, self-pruning 404 log,
  content-based destination suggestions, and automatic slug-change redirects.
