WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Issue with feeds - XML, RSS, MT, WP? (11 posts)

  1. ladydelaluna
    Member
    Posted 7 years ago #

    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?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  3. ladydelaluna
    Member
    Posted 7 years ago #

    Thanks so much, Otto! :)

  4. Chris_K
    Member
    Posted 7 years ago #

    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.

  5. Chris_K
    Member
    Posted 7 years ago #

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

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  7. ladydelaluna
    Member
    Posted 7 years ago #

    LOL

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

  8. Chris_K
    Member
    Posted 7 years ago #

    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. :-)

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

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

    No, but I could probably fake it.

  10. ladydelaluna
    Member
    Posted 7 years ago #

    LOL got an IM Otto?

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

  11. ladydelaluna
    Member
    Posted 7 years ago #

    Just an FYI - I hired an outside programmer to do it for me. Was worth every penny! :)

Topic Closed

This topic has been closed to new replies.

About this Topic