=== Strayless – Redirects & 404 Monitor ===
Contributors: 1dofollow
Tags: redirect, 301, 404 monitor, broken links, seo
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage 301, 302, 307 and 410 redirects, see which 404s your visitors hit and fix them in one click. Old links keep working when you change a slug.

== Description ==

Every moved page, renamed post or deleted product leaves links behind that now end in "Page not found". Visitors bounce and search engines drop the old URL. Strayless catches those strays: it sends old URLs to the right place and shows you the missing URLs people are still asking for.

Everything runs inside WordPress. No account, no external service, no tracking. The 404 log stores the missing URL, a hit counter and the referring page, never IP addresses.

= Free features =
* Redirects with 301, 302, 307, 308 or 410 (Gone)
* Matches URLs regardless of case and trailing slash (both can be switched off)
* Query strings: ignore them, pass them on to the new URL, or match them exactly
* Redirect to a page on your site or to any other website
* Loop protection: a redirect that points to itself or would start a loop is refused before it is saved
* Automatic 301 when the URL of published content changes (new slug, new parent page), with older redirects re-pointed so no chains build up
* 404 log: one row per missing URL with hit count, first and last seen, and the last referring page
* Fix a 404 in one click: "Redirect" opens the form with the URL filled in
* Ignore list for URLs you do not care about (bots, old feeds)
* Automatic clean-up of the log after a number of days, with a row limit
* Hit counter and "last hit" for every redirect, search, enable/disable and bulk actions
* Export all redirects as CSV
* Clean uninstall: deleting the plugin removes its tables and settings

= Strayless Pro =
Pro is a separate add-on plugin, available at https://1dofollow.com/plugins/strayless :
* Wildcard and regular-expression redirects with $1 captures
* Conditional redirects: logged in or out, user role, referrer, mobile or desktop, browser language, cookie
* Smart 404 fallback: send lost visitors to the closest matching post, a page of your choice or the home page
* Redirects for trashed content to its parent page, category or archive
* CSV import, Apache (.htaccess) and Nginx rule export
* Redirect-chain finder with one-click flattening
* 30-day report, top referrers of 404s, weekly 404 email
* WP-CLI commands

== Installation ==

1. Install and activate Strayless from Plugins → Add New, or upload the `strayless` folder to `/wp-content/plugins/`.
2. Go to Tools → Strayless.
3. Add your first redirect, or open the 404 Log after a few days to see which URLs need one.

== Frequently Asked Questions ==

= Does Strayless slow down my site? =
A redirect lookup is a single indexed database query on the requested path. 404s are written as one row per URL with a counter, so a flood of hits on the same URL does not grow the table.

= Does it store personal data? =
No IP addresses or user agents are stored. The 404 log keeps the missing URL, a hit counter, dates and the last referring page. You can switch the referrer off, or switch logging off completely.

= Which redirect type should I use? =
301 for content that moved for good (this tells search engines to use the new URL). 302 or 307 for temporary moves. 410 tells search engines the page is gone and will not come back.

= Will it redirect my site in a loop? =
Strayless refuses a redirect that points to itself or that would create a loop with an existing redirect, and it never redirects a page to the same URL.

= My site is in a sub-folder. What URL do I enter? =
Enter the path relative to your site, such as `/old-page/`. Full URLs on your own domain also work; Strayless strips the domain and the sub-folder for you.

= What happens to WordPress' own old-slug redirect? =
It keeps working. Strayless runs first and adds a visible, editable redirect, which also covers pages and changed parent pages.

= I use a page cache. Do redirects still work? =
Yes. Most cache plugins do not cache redirects or 404s. After adding a redirect for a URL that was cached as a normal page, clear that page from the cache.

= How do I move redirects from another site? =
Use Export CSV on the old site. Importing a CSV is part of Strayless Pro.

== Screenshots ==

1. Redirects: add a redirect and manage all of them with hits and last-hit dates.
2. 404 Log: missing URLs with hit counts and referrers, each fixable in one click.
3. Settings: URL matching, automatic redirects for changed permalinks and log retention.

== Changelog ==

= 1.0.0 =
* First release: redirects (301, 302, 307, 308, 410), query-string handling, loop protection, automatic redirects for changed permalinks, 404 log with one-click fixes and ignore list, CSV export.

== Upgrade Notice ==

= 1.0.0 =
First release.
