Plugin Directory

Changeset 520205


Ignore:
Timestamp:
03/17/2012 02:55:32 PM (14 years ago)
Author:
wordpress_website
Message:

Committing version 1.3

Location:
404-redirection/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 404-redirection/trunk/index.php

    r437501 r520205  
    77Author: wordpress-website.org
    88Author URI: http://wordpress-website.org/
    9 Version: 1.0
    10 Stable tag: 1.0
     9Version: 1.3
     10Stable tag: 1.3
    1111License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1212
    1313License:
    1414 ==============================================================================
    15  Copyright 2011 Don J  (email : admin@wordpress-website.org)
     15 Copyright 2011-2012 Don J  (email : admin@wordpress-website.org)
    1616
    1717 This program is free software; you can redistribute it and/or modify
     
    3232function redirect_all_404s() {
    3333    global $wp_query;
    34     if ($wp_query->is_404 ) {
    35        header("Location: ".get_bloginfo('siteurl'),TRUE,301);
     34    if ($wp_query->is_404) {
     35       wp_redirect(get_bloginfo('wpurl'),301);exit;
    3636    }
    3737}
    38 add_action('wp', 'redirect_all_404s');
     38add_action('wp', 'redirect_all_404s', 1);
    3939
    4040?>
  • 404-redirection/trunk/readme.txt

    r437501 r520205  
    33Tags: 404, redirect, redirects, redirector, server error, redirection
    44Requires at least: 2.0.2
    5 Tested up to: 3.2.1
    6 Stable tag: 1.0
     5Tested up to: 3.3.1
     6Stable tag: 1.3
    77
    88Permanently redirect all 404's to the main blog URL. The primary purpose is to salvage Google PageRank (TM) from missing pages.
     
    1010== Description ==
    1111
    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.
     12This 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.
    1313
    1414== Installation ==
    1515
    1616The installation process is very basic:
    17 
    18 e.g.
    1917
    20181. Upload the unzipped plugin folder to the `/wp-content/plugins/` directory
     
    2826= Do I have to configure anything? =
    2927
    30 Nope. The plugin is ready to go once you install it.
     28Nope. 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
     32Yes! 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
     36The 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
     40For instances when there is no referrer, it is assumed that the requested URL that generated a 404 was mistyped.
    3141
    3242= Can you give me some examples for why this plugin may be beneficial to me? =
     
    4050== Changelog ==
    4151
     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
    4257= 1.0 =
    4358* Created plugin
Note: See TracChangeset for help on using the changeset viewer.