Redirecting WordPress Feeds to FeedBurner v2
Version: 32.1 v2
Revision: 65 Build 32
Redirecting WordPress Feeds to FeedBurner v2
Introduction: when I was maintaining my wordpress articles, I was angry to see that my Feedburner plugin went dead and broken! So, I began to write a htaccess script to redirect visitor to FeedBurner. However, there is one little setback…you need to have “mod_rewrite” enabled.
1.] Download notepad++ from the original author or from a mirror and install the software.
——————————-
http://sourceforge.net/projects/notepad-plus/
http://filehippo.com/download_notepad/
——————————-
2.] Download your “.htaccess” file or create a new one and insert this code before “wordpress permalink” section, if not, the redirect rules will not work!
—Copy Source Code—
# Redirect all RSS to FEEDBURNER
# as default WordPress Feed
# *******************************
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^.*(feedburner|feedvalidator) [NC]
RewriteCond %{QUERY_STRING} feed=(rss|rss2|atom).* [NC]
RewriteRule ^(.*)$ http://feeds.feedburner.com/ContentFeed? [NC,R=302]
RewriteCond %{QUERY_STRING} feed=(comments\-rss|comments\-rss2|comments\-atom).* [NC]
RewriteRule ^(.*)$ http://feeds.feedburner.com/CommentFeed? [L,NC,R=302]
</IfModule>
—End Source Code—
Copyright 2001-2009 Lair360
Notes: please replace: “ContentFeed” and “CommentFeed” with your FeedBurner username or user profile. But, you must keep the question-mark symbol for it to work…
This htaccess script is also similar and it will also perform the same techniques which is shown above. However, its a little long…
—Copy Source Code—
# Redirect WordPress content Feeds to FeedBurner
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/ContentFeed [R=302,NC,L]
</IfModule>
# Redirect WordPress comment Feeds to Feedburner
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/CommentFeed [R=302,NC,L]
</IfModule>
—End Source Code—
Copyright 2001-2009 Lair360
This version is my last revision. But, it looks a lot cleaner than the ones above!
But, please use the above if your server provider doesn’t allow this version…
—Copy Source Code—
# Compacted version for FeedBurner and WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/?(feed.*|comments.*) [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
RewriteRule ^feed/?.*$ http://feeds.feedburner.com/contents? [L,NC,R=302]
RewriteRule ^comments/?.*$ http://feeds.feedburner.com/comments? [L,NC,R=302]
</IfModule>
—End Source Code—
Copyright 2001-2009 Lair360
Notes: if the above script doesn’t work, please remove the question-mark symbol which is marked after “feedburner.com/comments” and “http://feeds.feedburner.com/contents”.
But, if you only want your feeds to be redirected, please unmark “comments” – rewriterules.
3.] Save your “htaccess” files and delete the old version from your server and upload your new ones. After that, you’ll need to clear your internet caches, then check your redirects!
4.] Done!


