Support » Fixing WordPress » Issue with feeds – XML, RSS, MT, WP?

  • Resolved ladydelaluna

    (@ladydelaluna)


    Okay, so I installed WP for a client in a subfolder, but pointed the blog to the main domain.

    His old feeds, using MT were:
    site.com/index.xml
    and
    site.com/atom.xml

    Obviously, the new feeds, with WP are (essentially):
    site.com/feed/
    and
    site.com/feed/atom

    The old MT site is still up (I’m STILL trying to figure out how to do the redirect properly) but we don’t want people getting those feeds, we want them getting the new ones automatically.

    Is there a way to correct this, or do I have to resort to putting up a post on the MT site explaining that everyone needs to update their feeds?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Quick and simple method, add to site.com’s main .htaccess file:

    Redirect 301 index.xml http://site.com/feed/
    Redirect 301 atom.xml http://site.com/feed/atom/

    Add these at the top of the file, before all other lines.

    The 301 is the code for “Moved Permanently”, and a good feed reader (and all search engines) will interpret this as a cue to change where they are looking for this feed/file in the future.

    This does have a downside. A poorly written reader might not be able to interpret 301 codes correctly, and thus be unable to get the feed. I am unaware of any reader that will be unable to do this, because most are built on standard http code packages that can do this redirection transparently, but still, it is a possibility. However, there’s no way to help these people in any case (they’ll have to manually change their feeds), so it’s not generally something to worry about.

    Thanks so much, Otto! 🙂

    Something like in .htaccess might work (warning, I’m not an .htaccess wizard and this is based on something that seems to work for me in a similar scenario!)

    # Catch the old feed references
    RewriteBase /
    RewriteRule ^index.xml?$ /feed/ [R=301,L]
    RewriteRule ^atom.xml?$ /feed/ [R=301,L]

    May take some tweaking, but hopefully that’s close.

    Doh. I’m slow. Hey Otto, am I close?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    HandySolo: Yes, that is close. Only problem is that your atom.xml is pointing to an RSS feed now. 😉

    The Redirect approach is slightly faster than a Rewrite approach. However, if Redirect doesn’t work on a particular server, Rewrites sometimes will. Depends on what Apache modules are loaded. Usually both are loaded and so for a simple redirect of a file that doesn’t need regular expression matching, Redirect is the way to go.

    LOL

    Hey, either of you guys know anything about MT – WP redirects?

    Thanks for the explanation. Much appreciated.

    Oh, in my defense for pointing atom to RSS… where I’ve done this /feed/ was actually redirected to feedburner which handles the atom/rss thingie for me. 🙂

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Hey, either of you guys know anything about MT – WP redirects?

    No, but I could probably fake it.

    LOL got an IM Otto?

    (And thank you both for the help with the feed thing!!)

    Just an FYI – I hired an outside programmer to do it for me. Was worth every penny! 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Issue with feeds – XML, RSS, MT, WP?’ is closed to new replies.