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/
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.
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?
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.