9, November 2009

Webdigity tutorials : Redirecting your old feed to FeedBurner

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Tutorials @ webDigity
Redirecting your old feed to FeedBurner

Subscribe to our tutorials feed!

Recently I moved a feed to FeedBurner. The problem was that I wanted to redirect old users to the new feed url, but in the same time allow FeedBurner to visit the old feed in order to crawl it.

The solution to this is pretty simple. Just open your feed's php file and put this in the beginning :

Code:
<?php
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'FeedBurner')===false ){
  
header 'HTTP/1.1 301 Moved Permanently' );
header 'Location: http://feeds.feedburner.com/NewFeedURL');
exit;
}
?>

Do you like this tutorial?
Feel free to share it with others using Dzone or your favorite bookmarking service. You can see related discussions in our php forum
This tutorial posted by Nikolas from Sublime Directory

Sponsors :

Code library menu :
[ Tutorials home | Submit a tutorial ]

User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 09, 2009, 07:00:36 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 42.741
Total Topics: 8.375
Total Members: 6.939
Tutorials : 58
Resources : 929
Designs : 341
Latest Member: Auguste Dubuisson

23 Guests, 3 Users online :

15 users online today:




Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2009 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.