Redirect feeds to a single format

March 25, 2011 at 6:11 pm

WordPress provides feeds in four different formats: Atom, RDF, RSS, and RSS2. These days, most people are only using the RSS2 format. So what about redirect Atom, RDF, RSS to RSS2? This is what I’m going to show you today.

Open your .htaccess file (located at the root of your WordPress install) and add the following code. Don’t forget to modify http://example.com/feed/
by your feed url, and backup your .htaccess file before editing it!

<IfModule mod_alias.c>
 RedirectMatch 301 /feed/(atom|rdf|rss|rss2)/?$ http://example.com/feed/
 RedirectMatch 301 /comments/feed/(atom|rdf|rss|rss2)/?$ http://example.com/comments/feed/
</IfModule>

Credits goes to Digging into WordPress for the cool tip!

Tags: