Quantcast
Channel: TechSpotting » .htaccess
Viewing all articles
Browse latest Browse all 2

Redirect WordPress Feed to Feedburner

$
0
0

FeedBurner LogoSo you have signed up to FeedBurner and added your FeedBurner link to your Blog, nice work.

But, what about all the people that will add the  http://techspotting.org/feed instead? Such as, automated RSS finder tools and other sites on the web.

Redirect your blog feed to FeedBurner

There is a simple solution to redirect all your RSS / RSS2 / ATOM feeds to Google’s FeedBurner, simply add the following code to your .htaccess file:

# temp redirect wordpress content feeds to feedburner 

<IfModule mod_rewrite.c> 
RewriteEngine on RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner) [NC] 
RewriteCond %{HTTP_USER_AGENT} !^.*(FeedValidator) [NC] 
RewriteCond %{HTTP_USER_AGENT} !^.*(Googlebot) [NC] 
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/tech-spotting [R=302,NC,L] 
</IfModule>

MAKE SURE YOU PLACE THIS AT THE TOP OF YOUR .htaccess FILE!

This works without throwing your FeedBurner feed into a loop do not use !FeedBurner or !FeedValidator as found on some other blogs.

The Googlebot entry is to stop Google Webmaster Tools breaking if you are using your /feed as a sitemap.

Obviously you need to change your FeedBurner URL and don’t forget to sign up to TechSpotting’s FeedBurner it’s free and informative ;)

Technorati Tags: .htaccess, blog, FeedBurner, HowTo, RSS, WordPress


Viewing all articles
Browse latest Browse all 2

Trending Articles