PDA

View Full Version : Pixelpost and Feedburner


walter
11-11-2006, 08:54 PM
Hi all,
I'm using pixelpost here: www.walter.bz/photoblog.
I have two others blog and I've started using feedburner.
I wanted to "feedburn" my photoblog too, but without changing the original feed .
I've found a working solution, but I'm not a pixelpost expert, so I post it here to see if it's all right, or if someone have better solutions:

1) I've duplicated the index.php page and renamed feed.php: http://www.walter.bz/photoblog/feed.php?x=rss

2) I've created a feedburner feed with this feed: http://feeds.feedburner.com/waltersphotoblog

3) I've added these lines of codes in index.php after the first php tag <?php :

// checks if a rss or atom feed is asked
if(isset($_GET['x'])&&$_GET['x'] == "rss" OR $_GET['x'] == "atom"){
// redirects to feedburner link with a 307 message
header("Location: http://feeds.feedburner.com/waltersphotoblog");
header("HTTP/1.1 307 Temporary Redirect");
//exit page
exit();

};


In this way people who have bookmarked my old feed does not need to change the feed address. And now my feed is handled by feedburner.
Another advantage is that if I decide to stop working with feedburner, I just remove the code.

If you click my standard pixelpost feed you will be redirected to the feedburner feed:

www.walter.bz/photoblog/index.php?x=rss

I've tried also with rewriterule conditions of apache but I've found that it does not seems to work with anything else that is after the ? sign. The pixelpost feed is after that sign.

It seems to work fine.
I've updated my bookmark at photoblogs.org and it is ok.
Tested with various browser and feed readers and also ok.

The file duplication is necessary due to the fact that using the original feed will cause a loop in feedburner. Perhaps adding a feedburner header detect in the conditions would be a cleaner solution.

euscera
05-28-2007, 02:29 AM
Works great!
Thanks!

chinaski
05-28-2007, 03:25 AM
thanks walter. i just implemented the feedburner redirect in my photoblog and works well.

http://www.dezigne.com.ar/frozen/