Tuesday, April 28, 2009

WordPress: Disable Canonical URL Redirection Plugin

If you've got WordPress redirecting the browser to a URL, only to cause Apache (or whatever you are running as a web server) to redirect back to the original URL, you've got to disable the canonical URL redirection in WordPress. You can do this by saving the following to a PHP file in the plugins directory and activating it via WordPress.

<?php
/*
Plugin Name: Disable Canonical URL Redirection
Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above.
Version: 1.0
Author: Mark Jaquith
Author URI: http://markjaquith.com/
*/

remove_filter('template_redirect', 'redirect_canonical');
?>

1 comment:

  1. Programming is not only for boys because girls will like this game too.
    Cool addicting games

    ReplyDelete