Miguel
Advanced Member
Member # 47
|
posted
Bootstrap: How to redirect an RSS feed Posted by Dave Winer, 10/21/02 at 7:21:46 AM.
Scenario
Here's the scenario. You've just moved your weblog or news site, and the RSS feed has moved too. You want people who are subscribed to your RSS feed to automatically start reading the feed at its new location. This document explains how to do that.
How to redirect a RSS feed
To let the aggregator know the new location, you may either do an HTTP-level or XML-level redirect.
An HTTP-level redirect is done by returning a 301 status code, according to the HTTP standard. People who don't run their own servers may not be able to do this kind of redirect; or may not know how to do it. For those situations we have defined a simple way to do an XML-level redirect, that's totally under the control of person who creates content, and requires no support from system administrators.
XML-level redirect
Here's how to create an XML-level redirect. First, create a new file in place of the RSS feed, with the same name, in the same directory, using a text editor. It has one top-level element, as all XML files do, named <redirect>. It has no attributes and must have one sub-element, named <newLocation>, whose value is the URL of the new location of the file. If the value is the empty string, then the file indicates that the RSS resource is gone, and has not been moved.
Example
Here's an example of an XML-level redirect.
<?xml version="1.0"?> <redirect> <newLocation>http://www.wepub.com/myweblog/rss.xml</newLocation> </redirect>
Bonus feature
Phil Ringnalda suggests that we need a way to say that a feed is finished, that it's no longer being updated, that aggregators can stop checking to see if it's changed. Here's how you express that.
<?xml version="1.0"?> <redirect> <newLocation/> </redirect>
In other words, it's being redirected nowhere.
It's a bootstrap
As of this writing only Radio UserLand supports the XML-level redirect, and you must update to get the new parts. We're optimistic that other popular RSS-based aggregators will also support it. For developers, here's a sample file you can test with.
Also, this appears to be new art in the XML world, no other format has the equivalent of the <redirect> format. That's why I designed it the way I did, so it could be used with any format, not just RSS. It should work equally well with all flavors of XML, and maybe even other non-XML formats.
-------------------- Romans 9:11-24
Our Eschatology may vary even our Ecclesiology may be disputed among us but our Soteriology most assume a singularity and exclusivity which in biblical term is known as Quote; "The Narrow Way" and Quote!
Posts: 2792 | From: Stockton,Ca | Registered: Jun 2002
| IP: Logged |
|