开发者

How to hide RSS page from everyone except FeedBurner

I want to hide my feed from everyone except FeedBurner.

When FeedBurner v开发者_运维问答isits 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜