WP 404 Auto Redirect to Similar Post - Version 1.0.2

Version Description

  • Fix: Request sanitization compatibility for nginx servers
Download this release

Release Info

Developer hwk-fr
Plugin Icon 128x128 WP 404 Auto Redirect to Similar Post
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

readme.txt CHANGED
@@ -4,7 +4,8 @@ Donate link: https://hwk.fr/
4
  Tags: SEO, 404, Redirect, 301, Similar, Related, Search, Broken Link, Webmaster Tools, Google
5
  Requires at least: 4.0
6
  Tested up to: 4.9.8
7
- Stable tag: 1.0.1
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -375,6 +376,9 @@ function my_404_after_redirect($query){
375
 
376
  == Changelog ==
377
 
 
 
 
378
  = 1.0.1 =
379
  * Fix: Priority exception when it equals 0
380
  * Fix: Settings page link missing from plugins page
4
  Tags: SEO, 404, Redirect, 301, Similar, Related, Search, Broken Link, Webmaster Tools, Google
5
  Requires at least: 4.0
6
  Tested up to: 4.9.8
7
+ Requires PHP: 5.4
8
+ Stable tag: 1.0.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
376
 
377
  == Changelog ==
378
 
379
+ = 1.0.2 =
380
+ * Fix: Request sanitization compatibility for nginx servers
381
+
382
  = 1.0.1 =
383
  * Fix: Priority exception when it equals 0
384
  * Fix: Settings page link missing from plugins page
wp-404-auto-redirect-similar-post.php CHANGED
@@ -2,9 +2,10 @@
2
  /**
3
  * Plugin Name: WP 404 Auto Redirect to Similar Post
4
  * Description: Automatically Redirect any 404 page to a Similar Post based on the Title, Post Type & Taxonomy using 301 Redirects!
 
5
  * Author: hwk-fr
6
- * Version: 1.0.1
7
- * Author URI: http://hwk.fr
8
  */
9
 
10
  if(!defined('ABSPATH'))
@@ -103,7 +104,7 @@ class WP_404_Auto_Redirect {
103
  return;
104
 
105
  // Sanitize Request
106
- $request = urldecode(filter_input(INPUT_SERVER, 'REQUEST_URI'));
107
  if(empty($request))
108
  return;
109
 
2
  /**
3
  * Plugin Name: WP 404 Auto Redirect to Similar Post
4
  * Description: Automatically Redirect any 404 page to a Similar Post based on the Title, Post Type & Taxonomy using 301 Redirects!
5
+ * Version: 1.0.2
6
  * Author: hwk-fr
7
+ * Author URI: https://hwk.fr
8
+ * Text Domain: wp-404-auto-redirect
9
  */
10
 
11
  if(!defined('ABSPATH'))
104
  return;
105
 
106
  // Sanitize Request
107
+ $request = urldecode(esc_url_raw($_SERVER['REQUEST_URI']));
108
  if(empty($request))
109
  return;
110