WordPress.org

Support

Support » Requests and Feedback » Moving location of RSS feed to a new folder…

Moving location of RSS feed to a new folder…

  • Hi,

    I’m a new user of WordPress from b2evolution. The instructions to convert from b2evo to WP were extraordinarily easy and I’m extremely pleased with my decision.

    I have a question regarding RSS feeds. My old RSS feed was located in a directory called xmlsrv. It had about 80 subscribers via bloglines and who knows how many from other news aggregators. Because it was associated with b2evo, it no longer works now.

    Is it possible to move the WP RSS feed to the old location so I don’t have to make people subscribe all over again?

    Just curious.

    Thanks!
    Gracie

Viewing 6 replies - 1 through 6 (of 6 total)
  • A couple ways to go about this:

    1. Use mod_rewrite (and .htaccess) to redirect links for site/xmlsrv/ to your new WordPress RSS feed URL. Not everyone can do this (all depends on the server and what’s supported), but an example rewrite rule would be:

    RewriteRule ^xmlsrv/? /?feed=rss2

    2. Make a copy of wp-feed.php. In the copy edit this line:

    require(dirname(__FILE__) . '/wp-blog-header.php');

    to

    require('../wp-blog-header.php');

    Or provide an absolute path to that file. Then rename the copy index.php and drop it in your /xmlsrv directory.

    mod_rewrite or Redirect is best, but if you can’t do that, here’s a better solution than making a copy of your wp-feed.php: make a PHP file at the old location and put this in it:

    <?php
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: http://site.com/blog/feed/');
    ?>

    The URL you use can either be full (as shown) or partial (feed/ or /blog/feed/).

    The only issue I’d bring up with your suggestion Viper is that not all aggregators properly handle 301 redirects. I know Bloglines had this problem about a year ago, though it’s possible they’ve since fixed it.

    Mmm, true. Okay then I’d suggest require()‘ing in wp-feed.php rather than making a copy of it. This way you don’t have to redo it each time you upgrade.

    Thanks for all the suggestions! I need to really read up on RSS feeds in order to try them. I’ll let you know if they work!

    IT WORKED! THANK YOU!

    I replaced my orginal atom.php feed text with the following code and bloglines is picking it up. I’m not sure if other news aggregators are as I don’t use them–I suppose I should check. Regardless, thank you for your help!

    <?php
    header(‘HTTP/1.1 301 Moved Permanently’);
    header(‘Location: http://site.com/blog/feed/‘);
    ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Moving location of RSS feed to a new folder…’ is closed to new replies.