FeedBurner HtAccess Redirect for WordPress Feeds

Firstly, we burn our wordpress feeds to FeedBurner. You can burn in www.feedburner.com , we get a feedburner link like “http://feeds2.feedburner.com/WebmasterSucks“. I also burned comments feed. We redirect our WordPress feed to FeedBurner. Its help us to track our feed and add adsense code to our feeds.

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_URI}      ^/?(feed.*|comments.*)        [NC]
 RewriteCond %{HTTP_USER_AGENT} !^.*(feedburner|feedvalidator) [NC]
 RewriteRule ^feed/?.*$ http://feeds2.feedburner.com/WebmasterSucks         [L,NC,R=302]
 RewriteRule ^comments/?.*$ http://feeds2.feedburner.com/WebmasterSucksComments [L,NC,R=302]
</IfModule>

For more information :
http://perishablepress.com/press/2008/10/13/wordpress-feedburner-htaccess-redirect-default-feeds/

Share and Enjoy:
  • StumbleUpon
  • Digg
  • TwitThis
  • FriendFeed
  • del.icio.us
  • MySpace
  • Technorati
  • Facebook
  • Google Bookmarks
  • Live

Enjoy this article?

Consider subscribing to our RSS feed!

Share us Facebook, FriendFeed, Digg

Liked by

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

4 Comments

  1. Rahul
    14:50 on June 12th, 2011

    Thanks for posting this article and it has been quite helpful in understanding few of the technicalities .
    However I am having some problems in redirecting multiple rss feeds to feedburner, as the feedburner is unable to show updated data .My .htaccess file looks like
    —————————————————————————————-
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator) [NC]
    RewriteCond %{HTTP_USER_AGENT} .

    Redirect 302 /rss/abc.xml http://feeds.feedburner.com/www123com
    Redirect 302 /rss/def.xml http://feeds.feedburner.com/www123com
    Redirect 302 /rss/ghi.xml http://feeds.feedburner.com/www123com

    </IfModule>
    ——————————————-
    The first redirect 302 is showing updated data and the rest are showing old data. It would be of great help if you could guide me on this.

    Thanks in advance
    Rahul

  2. Hasan Yaşar
    02:27 on June 13th, 2011

    Try this code:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/?(abc.*|def.*|ghi.*) [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(feedburner|feedvalidator) [NC]
    RewriteRule ^rss/abc.xml?.*$ http://feeds.feedburner.com/www123com [L,NC,R=302]
    RewriteRule ^rss/def.xml?.*$ http://feeds.feedburner.com/www123com [L,NC,R=302]
    RewriteRule ^rss/ghi.xml?.*$ http://feeds.feedburner.com/www123com [L,NC,R=302]
    </IfModule>

  3. Rahul
    04:04 on June 13th, 2011

    Thanks Hasan,I will give it a try .

  4. Hasan Yaşar
    04:19 on June 13th, 2011

    You are welcome, i hope it is running

Sorry, the comment form is closed at this time.

Oyun