1

I want to hide my feed from everyone except FeedBurner.

When FeedBurner visits my rss page, I want them to be able to crawl.

When anybody else visits that page, it will be redirected to my FeedBurner page.

How would you do it?

My blog is written in PHP. (custom code)

Additional info:

I prefer to redirect using the head("location: ") method in PHP instead of .htaccess

My rss page is: domain.tld/feed/

webnat0
  • 2,646
  • 5
  • 29
  • 43
  • http://ajaydsouza.com/archives/2006/08/04/how-to-use-htaccess-to-redirect-your-blog-feed-to-your-feedburner-feed/ – seriousdev Feb 27 '11 at 11:55

3 Answers3

3

The Feeburner UserAgent is FeedBurner/1.0. You can use $_SERVER['USER_AGENT'] to detect the user agent and redirect everyone except feedburner.

Edit: You can also use .htaccess like in the documentation Pascal MARTIN provided.

Ray
  • 1,192
  • 6
  • 10
2

The following page of Feedburner's documentation might interest you : How do I redirect traffic from my site's original feed to my FeedBurner feed?

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
1

You can check the user agent for FeedBurner, but as user agents can be spoofed I wouldn't be too dependant on this approach if the RSS hiding is being done for security reasons.

GordonM
  • 31,179
  • 15
  • 87
  • 129
  • That's true, but I think it's only to prevent that users subscribe to his feed instead of the FeedBurner feed. – Ray Feb 27 '11 at 12:05
  • Yes. It's mostly to prevent users subscribing to the wrong feed. But I also want to do this so that bots can't easily steal my contents. (my feed will have full-length contents while the FB feed will only have excerpts) – webnat0 Feb 27 '11 at 13:02
  • Thank you for this question, @webnat0, now I can get the raw feeds from a blog. To steal contents? No, because, unlike WordPress, FeedBurner don't support category and search feeds. Maybe you're losing users by blocking those features. – Gustavo Rodrigues Apr 20 '15 at 19:19