When moving from Textpattern to WordPress don’t forget to redirect your RSS feeds

The instructions for importing Textpattern into WordPress work fine, however I think there are more things that can be done.

If you install WP into a different directory, and keep the Textpattern around as I have, then users who refer to your old RSS feeds will continue to get stale info. Instead you want your legacy Textpattern installtion to redirect to WordPress.

You can add a few lines to the top level index.php in the textpattern installation directory. Below, the yellow section is new, and the bold lines have to change to refer to your WP site:

<?php

$atom = $_GET[ "atom"];
if ( $atom == 1)
{
header( "Location: http://www.searchmorph.com/wp/feed/atom/");
exit( 0);
}
$rss = $_GET[ "rss"];
if ( $rss == 1)
{
header( "Location: http://www.searchmorph.com/wp/feed/rss/");
exit( 0);
}

include 'textpattern/config.php';
include $txpcfg['txpath'].'/publish.php';
textpattern();
?>

One Response to When moving from Textpattern to WordPress don’t forget to redirect your RSS feeds »»


Comments


Trackbacks & Pingbacks »»

  1. Pingback by Textpattern RSS now redirected [MacStansbury] | 2006/07/17 at 10:21:27

    [...] If you can read this, thank Dave. He’s the one who figured it out. [...]

Leave a Reply »»