=== SEO Redirection Plugin - 301 Redirect Manager ===
Contributors: wp-buy, osamaesh, adam1318
Tags: 301 redirect, 404, redirect, redirection, redirect manager, htaccess, seo, wildcard, regex, url redirect
Requires at least: 4.1
Tested up to: 6.9.4
Requires PHP: 7.0
Stable tag: 9.18
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage 301, 302, and 307 redirects from inside WordPress — no .htaccess needed. Track 404 errors, fix broken links, and protect your SEO.

== Description ==

**SEO Redirection** is a complete redirect manager for WordPress. Create, edit, and track 301/302/307 redirects from a single dashboard — no FTP, no `.htaccess` editing, and no developer knowledge required.

Whether you are migrating a site, restructuring permalinks, cleaning up after a redesign, or recovering lost traffic from broken links, SEO Redirection keeps your old URLs pointing to the right destinations and your visitors out of dead ends.

= Why use SEO Redirection? =

* **Protect your SEO ranking** — redirects are created automatically whenever a post or page URL changes.
* **Recover lost traffic** — turn 404 errors into proper redirects with a single click.
* **Migrate sites painlessly** — redirect old paths, entire folders, or whole domains in bulk.
* **Stay GDPR-compliant** — configurable IP logging levels for every jurisdiction.
* **Works on any host** — pure WordPress, no Apache or Nginx configuration required.

= Redirect Management =

* Create 301, 302, and 307 redirects in a couple of clicks.
* **Wildcard and regular-expression** patterns to match many URLs at once.
* **Folder redirection** — move an entire directory and all its content in one rule.
* Redirect `index.php`, `index.html`, and `index.htm`.
* Add redirects directly from the post/page editor via the **Redirection Box**.
* Quick-add redirects from the WordPress admin toolbar.
* **Redirect-loop detection** prevents `ERR_TOO_MANY_REDIRECTS` at both save-time and runtime.

= 404 Error Tracking =

* Automatic discovery and logging of every 404 hit on your site.
* Fix **Google Search Console** crawl errors (404 & soft 404) without leaving WordPress.
* One-click "convert this 404 into a redirect".
* Full IP, browser, OS, country, and referrer data for every error.

= Conditional & Advanced Redirects =

* Redirect based on **login status**, **referrer**, or to **random pages**.
* Redirect any URL — not just non-existent ones.
* Full support for emojis and international URLs.
* Campaign-link redirects (works correctly with `fbclid`, `utm_source`, `gclid`, `msclkid`, etc.).

= Logging & Statistics =

* **Hit counts** and **last-access timestamps** for every redirect.
* Complete redirect history — searchable, sortable, exportable.
* Per-redirect statistics show when, where, and how often a URL was hit.

= Import & Export =

* Import existing rules from the popular **"Redirection"** plugin.
* Full import/export to keep staging and production environments in sync.

= Multi-language Support =

* **WPML** integration for multilingual sites.

= Privacy & GDPR =

* Configurable IP logging — collect full, partial, or no IP data to match the legal requirements of your region.

= Compatibility =

* WordPress **4.1** → **6.9+**
* PHP **7.0** → **8.4**

= PRO Version =

Need more? [Upgrade to SEO Redirection PRO](https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/?src=wp1) for additional features and priority support.

== Installation ==

The plugin is simple to install:

1. Download `seo-redirection.zip`
2. Unzip the file
3. Upload the `seo-redirection` directory to your `/wp-content/plugins` directory
4. Go to **Plugins → Installed Plugins** and activate **SEO Redirection**
5. Configure the plugin from **Settings → SEO Redirection**

Or install directly from your WordPress dashboard:

1. Go to **Plugins → Add New**
2. Search for **"SEO Redirection"**
3. Click **Install Now**, then **Activate**

You can find full details on the [plugin installation page](https://www.wp-buy.com/how-to-install-our-plugins/).

== Frequently Asked Questions ==

= Why use this plugin instead of editing .htaccess directly? =

Editing `.htaccess` is error-prone — a single typo can take your site offline. SEO Redirection works entirely inside WordPress, requires no server access, and automatically creates redirects when you change a post or page URL. You also get full 404 tracking, hit counts, and visitor statistics that `.htaccess` can never provide.

= Does it work on Nginx or LiteSpeed servers? =

Yes. All redirects are handled by WordPress itself, so the plugin works on any server WordPress runs on — Apache, Nginx, LiteSpeed, IIS, and others.

= Will it slow down my site? =

No. Redirects are looked up using the same mechanism WordPress uses for permalinks, with minimal overhead even on sites with thousands of rules.

= Can I migrate from another redirect plugin? =

Yes. You can import existing rules from the **"Redirection"** plugin directly from the Import/Export tab.

= Does it support regular expressions and wildcards? =

Yes — both. Use wildcards for simple pattern matching, or full regular expressions for fine-grained control.

= Is it GDPR-compliant? =

Yes. IP logging is fully configurable — store full IPs, anonymised IPs, or nothing at all, depending on your jurisdiction's requirements.

= Where can I get support or documentation? =

Full documentation is available at the [plugin knowledge base](https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/).

== Screenshots ==

1. SEO Redirection dashboard — manage all your redirects from one place
2. List of custom redirections with hit counts and last-access times
3. Page-to-Page custom redirection editor
4. Folder redirection — redirect an entire directory at once
5. Regular expression redirection for advanced patterns
6. Redirection Box on the post/page editor for one-click redirects
7. Full redirection history with visitor data
8. Control panel and options
9. In-line Redirection Box on the post edit screen

== Upgrade Notice ==

= 9.18 =
Security update — fixes a stored XSS vulnerability in the 404 Errors page reported by Patchstack. All users are strongly encouraged to update immediately.


== Changelog ==

= 9.18 =
* Security: Fixed stored XSS via spoofed IP headers (X-Forwarded-For / Client-IP) logged in the 404 Errors table — IP values are now strictly validated with FILTER_VALIDATE_IP.
* Security: Hardened datagrid HTML column rendering with esc_attr() to prevent unescaped DB values from breaking out of HTML attributes.

= 9.17 =
* Fix: PHP 8.2 fatal error (TypeError) with Divi and block editor themes — added REST_REQUEST guard to save_post hook.
* Fix: PHP 8.2 undefined array key HTTP_USER_AGENT in get_visitor_Browser() — added isset() guard.
* Fix: Redirects now fire correctly for visitors arriving via campaign links (fbclid, utm_source, gclid, msclkid and other tracking parameters).
* Fix: Redirect loop detection added at both save-time and runtime — prevents ERR_TOO_MANY_REDIRECTS crashes.
* Fix: Bootstrap 5 modal backdrop no longer freezes the page after closing — migrated from jQuery plugin API to Bootstrap 5 native API.
* Fix: Loading spinner no longer gets stuck on edit form open — fixed 'suucess' typo in PHP AJAX response + added complete() handler.
* Fix: All asset handles renamed to wpsr-* prefix to prevent conflicts with other plugins.
* Fix: Asset versions now use filemtime() for automatic cache busting after every update.
* Improvement: Redesigned admin UI — new tabs, table layout, buttons, and options page.
* Improvement: New marketing popup displaying real broken link count with upgrade call-to-action.
* Improvement: Redirect loop detection blocks saving rules where From and To resolve to the same path.


= 9.16 =
* PHP 8.4 Compatibility

= 9.15 =
* Bug fixing - adding the ability to delete redirect

= 9.14 =
* Bug fixing - 404 log
* Checking with wordpress version 6.7.2

= 9.13 =
* Allow INNODB tables.

= 9.12 =
* Bug fixing in permalinks.

= 9.11 =
* Fixing a bug in the 404 history.

= 9.10 =
* Fixing a bug in the toolbar menu icon permissions.

= 9.9 =
* Bug fixing in the toolbar menu icon.

= 9.8 =
* Add the ability to create redirects directly from the website by using a link in the toolbar menu.

= 9.7 =
* Checking with wordpress version 6.2.2

= 9.6 =
* Add the ability to create redirects directly from the website by using a link in the toolbar menu.


= 9.5 =
* Checking with wordpress version 6.2.2

= 9.4 =
* new feature (support emojis in redirects)


= 9.3 =
* Bug fixing permalink function


= 9.2 =
* Bug fixing in reading htaccess file. reported by (@theschappy)


= 9.1 =
* Important security fixes.


= 8.9 =
* Bug fixing in reading htaccess file

= 8.8 =
* Important security fixes.

= 8.7 =
* fix show more link on network sites

= 8.6 =
* CSS fixing

= 8.5 =
* Security bug fixing

= 8.4 =
* ui enhancement

= 8.3 =
* add settings page link under plugin name
* Bug fixing in updating redirects

= 8.2 =
* Important security fixes in Ajax requests


= 8.1 =
* Important security fixes.


= 7.9 =
* Security Bug fixing - Using nonce in deleting redirects


= 7.8 =
* Bug fixing - CSRF issue


= 7.7 =
* Bug fixing (solving http URLs issue)


= 7.6 =
* Escaping data - part 2


= 7.5 =
* Escaping data


= 7.4 =
* Escaping data & Bug fixing


= 7.3 =
* Bug fixing (solving datatable issues)


= 7.2 =
* Bug fixing (solving security issues) - part 2


= 7.1 =
* Bug fixing (solving security issues) - part 1


= 6.4 =
* Bugs fixed


= 6.3 =
* Bugs fixed
* Can delete 404 log

= 6.2 =
* bug fixed in redirection log

= 6.1 =
* adding new tab for 404 history
* adding more options in the options tab (404 options)

= 5.3 =
* Bug fixed in redirect hits and last access

= 5.2 =
* Bug fixed import redirects from Redirection Plugin



= 5.1 =
* Bug fixed in forms


= 5 =

* new features (sorting, deleting records)
* The ability to import data from the "Redirection Plugin"

= 4.17 =
* Bug fixed in http redirects

= 4.16 =
* fixed (is_plugin_active issue)

= 4.15 =
* fixing buddypress issue (redirects was not working for locked pages)
* Some other enhancements


= 4.14 =
* Adding option in the general options page for IP address GDPR Compatibility

= 4.13 =
* GDPR Compatibility

= 4.12 =
* fixing export redirects issue

= 4.11 =
* fixing Undefined index error

= 4.10 =
* fix deprecated issue in php 7

= 4.9 =
* WPML support
* Import/Export Feature
* New interface design 
* Show last access time & total hits

= 4.8 =
* display total 404 count

= 4.7 =
* php 7 compatibility

= 4.3 =
* Stored XSS fixes

= 4.2 =
* Hot fixes
* php 7 compatibility

= 4.1 =
* Removing "404" tab, We replaced it by a new advanced 404 management plugin. Have a look on this by following this link https://wordpress.org/plugins/404-redirection-manager/

= 4.0 =
* Please backup your data before using this version.

= 3.9 =
* Fixing some issues.
= 3.8 =
* Added feature, the capability to disable plugin for admin users
= 3.7 =
* Hot fixes
= 3.6 =
* Fixing some issues.
= 3.5 =
* Fixing some issues.
= 3.4 =
* Fixing error appears when deleting the plugin.
= 3.3 =
* Hot fixes
= 3.2 =
* Hot fixes
= 3.1 =
* Redirect loops protection
= 3 =
* Hot fixes
= 2.9 =
* Hot fixes for redirecting woo-commerce products.
= 2.8 =
* Redirect loop prevention.
* The Ad for the premium version has become in a separate tab not in all the plugin screens as it may disturb some people.
* Some other fixes.
= 2.7 =
* Some fixes.
= 2.6 =
* Some hot fixes.
= 2.5 =
* Using relative URLs instead of absolute URL's, This will useful when changing the domain name.
