404 Redirection - Version 1.3

Version Description

  • Set a high priority of plugin execution.
  • Switched to native WP redirection.
  • Replaced depreciated 'site_url' function call.
Download this release

Release Info

Developer wordpress_website
Plugin Icon wp plugin 404 Redirection
Version 1.3
Comparing to
See all releases

Code changes from version 1.0.0 to 1.3

Files changed (2) hide show
  1. index.php +6 -6
  2. readme.txt +21 -6
index.php CHANGED
@@ -6,13 +6,13 @@ Plugin URI: http://www.wordpress-website.org/
6
  Description: Permanently redirect all 404's to the main blog URL. The primary purpose is to salvage Google PageRank (TM) from missing pages.
7
  Author: wordpress-website.org
8
  Author URI: http://wordpress-website.org/
9
- Version: 1.0
10
- Stable tag: 1.0
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  License:
14
  ==============================================================================
15
- Copyright 2011 Don J (email : admin@wordpress-website.org)
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License as published by
@@ -31,10 +31,10 @@ License:
31
 
32
  function redirect_all_404s() {
33
  global $wp_query;
34
- if ($wp_query->is_404 ) {
35
- header("Location: ".get_bloginfo('siteurl'),TRUE,301);
36
  }
37
  }
38
- add_action('wp', 'redirect_all_404s');
39
 
40
  ?>
6
  Description: Permanently redirect all 404's to the main blog URL. The primary purpose is to salvage Google PageRank (TM) from missing pages.
7
  Author: wordpress-website.org
8
  Author URI: http://wordpress-website.org/
9
+ Version: 1.3
10
+ Stable tag: 1.3
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  License:
14
  ==============================================================================
15
+ Copyright 2011-2012 Don J (email : admin@wordpress-website.org)
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License as published by
31
 
32
  function redirect_all_404s() {
33
  global $wp_query;
34
+ if ($wp_query->is_404) {
35
+ wp_redirect(get_bloginfo('wpurl'),301);exit;
36
  }
37
  }
38
+ add_action('wp', 'redirect_all_404s', 1);
39
 
40
  ?>
readme.txt CHANGED
@@ -2,21 +2,19 @@
2
  Contributors: wordpress_website
3
  Tags: 404, redirect, redirects, redirector, server error, redirection
4
  Requires at least: 2.0.2
5
- Tested up to: 3.2.1
6
- Stable tag: 1.0
7
 
8
  Permanently redirect all 404's to the main blog URL. The primary purpose is to salvage Google PageRank (TM) from missing pages.
9
 
10
  == Description ==
11
 
12
- This simple plugin permanently redirects all 404's to the main blog URL. There may be several reasons why you might want to do this, but the primary purpose is to siphon Google Page Rank (TM) from missing pages to the homepage.
13
 
14
  == Installation ==
15
 
16
  The installation process is very basic:
17
 
18
- e.g.
19
-
20
  1. Upload the unzipped plugin folder to the `/wp-content/plugins/` directory
21
  2. Activate the plugin through the 'Plugins' menu in WordPress
22
  3. That's it!
@@ -27,7 +25,19 @@ If you're having issues with the installation, you can read detailed instruction
27
 
28
  = Do I have to configure anything? =
29
 
30
- Nope. The plugin is ready to go once you install it.
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  = Can you give me some examples for why this plugin may be beneficial to me? =
33
 
@@ -39,5 +49,10 @@ Example #2: Let's face it, having an exuberant amount of 404's is bad form. Sear
39
 
40
  == Changelog ==
41
 
 
 
 
 
 
42
  = 1.0 =
43
  * Created plugin
2
  Contributors: wordpress_website
3
  Tags: 404, redirect, redirects, redirector, server error, redirection
4
  Requires at least: 2.0.2
5
+ Tested up to: 3.3.1
6
+ Stable tag: 1.3
7
 
8
  Permanently redirect all 404's to the main blog URL. The primary purpose is to salvage Google PageRank (TM) from missing pages.
9
 
10
  == Description ==
11
 
12
+ This simple plugin tracks and permanently redirects all 404's to the main blog URL. There may be several reasons why you might want to do this, but the primary purpose is to siphon Google Page Rank (TM) from missing pages to the homepage.
13
 
14
  == Installation ==
15
 
16
  The installation process is very basic:
17
 
 
 
18
  1. Upload the unzipped plugin folder to the `/wp-content/plugins/` directory
19
  2. Activate the plugin through the 'Plugins' menu in WordPress
20
  3. That's it!
25
 
26
  = Do I have to configure anything? =
27
 
28
+ Nope. The plugin is ready to go once you install it. However, the date and time is based upon the timezone setting under the General Settings section of WordPress, and NOT that of your server time. If you find that the 404 logs are not displaying the accurate time, you may need to adjust your timezone.
29
+
30
+ = Can I view a log of the 404's? =
31
+
32
+ Yes! The "404 Tracker" link is located under the "Tools" tab. Just to be clear, no 404's were actually generated. The log serves as a way of tracking the 404's that would have otherwise been created if not for this awesome plugin.
33
+
34
+ = Why do some rows within the "404 Tracker" tinted red? =
35
+
36
+ The red tinted rows serve as an easy visual reference for every 404 that occured within the past 24 hours.
37
+
38
+ = What does "URL Typo" in the Referring URL column mean? =
39
+
40
+ For instances when there is no referrer, it is assumed that the requested URL that generated a 404 was mistyped.
41
 
42
  = Can you give me some examples for why this plugin may be beneficial to me? =
43
 
49
 
50
  == Changelog ==
51
 
52
+ = 1.3 =
53
+ * Set a high priority of plugin execution.
54
+ * Switched to native WP redirection.
55
+ * Replaced depreciated 'site_url' function call.
56
+
57
  = 1.0 =
58
  * Created plugin