skriker

How to use FeedBurner with WordPress without .htaccess file

author - malyfred / 2005-12-02

What is FeedBurner?

FeedBurner

For those who don't know FeedBurner yet – continue to services description. Shortly – you get statistics and some aditional services for your RSS feed for free.

Statistics

How to use it with WordPress?

If you use .htaccess file on your web – continue to WordPress FeedBurner Plugin.

The other people (including me) who are not allowed to use .htaccess files by their webhosting company. (So we have to have index.php in the permalink structure of our WordPress powered website.) must employ simple hack to achieve the same result.

Step by step

  1. Register at FeedBurner and when they ask you about your feed address use this:
    http://addressofyourweb/index.php?feed=rss2
    e.g. http://fredfred.net/skriker/index.php?feed=rss2
  2. Now the hack comes. Open wp-feed.php in the root directory of your site and edit it according to this example:


    <?php
    if (empty($doing_rss)) {
    $doing_rss = 1;
    require(dirname(__FILE__) . '/wp-blog-header.php');
    }

    //this is the code for FeedBurner
    if( $wp_query->query =='feed=feed' ){
    header("Location: http://feeds.feedburner.com/skriker/");
    exit;
    }
    //end of the added code

    where you replace http://feeds.feedburner.com/skriker/ with the address that you've got from the FeedBurner.

  3. All feeds from the default RSS address generated by WordPress (http://yourweb/index.php/feed/ e.g. http://fredfred.net/skriker/index.php/feed/) are redirected to the FeedBurner but your readers don't notice any change.

  1. NetAndif :: Panorama Test 2 2005-12-17 / 11.22 am

    […] Panorama-Plugin: http://fredfred.net/skriker/index.php/category/wordpress/ 17.12.05 @ 10:22  |  […]

  2. NetAndif :: Panorama-Test 3 2005-12-17 / 11.27 am

    […] Panorama-Plugin: http://fredfred.net/skriker/index.php/category/wordpress/ 17.12.05 @ 10:26  |  […]

  3. Gary Slinger 2006-01-12 / 10.02 pm

    Do you have a version of the above that works if the permalink structure of WordPress is set to other than the default, i.e. to date and name based?

    Gary

  4. malyfred 2006-01-13 / 7.16 pm

    Gary Slinger:: Do everything as suggested and offer this address to your visitors:

    http: //yourweb/index.php?feed=feed

    They’ll be redirected to the Feedburner. That’s 100% safe way.

    But I think that my recipe should work with any permalink structure, anyway.

  5. Greg 2006-01-13 / 9.18 pm

    Hey Malyfred,
    Thanks for this great script. It doubled my feedburner readership. I only have one problem left though.

    I used to use the standard wordpress permalinks, and obtained a lot of readers through this at http://www.diylive.net/?feed=rss2

    I now switched my permalinks, and obtained a lot of readers through http://www.diylive.net/index.php/feed

    I tried your script, and all of my readers through the second link go to my feedburner link, but my original readers can still access my wordpress generated rss through http://www.diylive.net/?feed=rss2

    What can I do to ensure that both go there? Thanks

  6. malyfred 2006-01-13 / 11.23 pm

    Greg:: hmmm, then you can do something like this – change:

    if ($feed == '' || $feed == 'feed')

    to

    if ($feed == '' || $feed == 'feed' || $feed == 'feedburner')

    and this:

    if( $wp_query->query =='feed=feed' )

    to

    if( $wp_query->query =='feed=feed' || $feed == 'rss2')

    Then set in Feedburner http://www.diylive.net/?feed=feedburner as the address of your feed.

  7. Fringe 2006-02-02 / 10.46 am

    Thanks for this hack.
    I used it for my blog and it does work.
    But I think There is some issue connected to
    the in the comments template.
    I see a lot of 404 error with this link
    Any hint?

  8. TreeFrog 2006-02-22 / 5.39 am

    Terrific Blog you have. Peace Out.
    TreeFrog

  9. JiggyWittit 2006-03-06 / 11.33 am

    Kewl blog you got goin on up here.
    Peace, JiggyWittit

  10. Nudecybot 2006-03-21 / 9.56 pm

    When you say “edit it according to this example” do you mean REPLACE the code indicated or ADD to that existing code within the curly brackets?

  11. Nudecybot 2006-03-21 / 10.02 pm

    Oh I get it, I just need to append that code to the section you indicate. Many thanks!

  12. elwyndfw 2006-04-10 / 3.46 am

    I’ve been messing with this suggestion for a while, and can’t seem to get it to work. It works when I modify it locally, however, I get an attempted redirect and a 500 internal server error. I’m using the latest version of wordpress…

    Any ideas?

  13. Ryan Wagner 2006-06-22 / 1.56 am

    I tried to do this and I got an error as well. It gave a link to where the page had moved and said there was a 500 error. This would have been perfect, too!

    Thanks for trying.

    -Ryan

  14. Felipe 2007-01-26 / 10.46 am

    thanks for the tip…
    it worked just fine to me =)

  15. Dreamer's Blog 2007-05-14 / 11.41 pm

    Feedburner service and plugin…

    Now I change to use FeedBurner Feed service.
    Subscribe in a reader
    You can click the button above to subscribe my Feed. The feed is always on the right side and bottom.
    Feedburner is so popular. I don’t want to write again.
    You can check the list…

  16. sopitikoj 2007-09-08 / 5.02 am

    Hi

    I really appreciated and say thank you for Keep up the great work online

    G’night

  17. Michael 2008-03-27 / 1.06 pm

    I’ve just spent too long trying to get the feedsmith thing to work – no joy. But cheers for this hack – am off to try it and see how I get on. TY for the help.

  18. Web 2.0 & Usability Blog 2008-04-15 / 4.52 pm

    I love using Feedburner, why does it get such a tough time?

  19. Vandit 2008-05-02 / 9.31 am

    Hello,

    I used feedburner plugin. But let me know if i want feed comment for Post 1 and Post 2.

    Then also feedburner works?

    E.g.
    1)

    I have created feeds in feedBurner for Posts and comments below
    http://feeds.feedburner.com/NationalArtsStrategies

    2) Installed Plugin and add above links.

    3) Now when i clicked on rss link for any post in wordpress it displays same feed for all the posts.
    it should display comments based on Posts only.

    for Feeding the post also … if i clicked on any category feed it will show me the same result for any category?

    Is that possible to pass cat id or page id to feedburner link to diplay the comments for individual post and posts for the individual category

  20. Kaydee 2008-05-19 / 5.42 am

    Dude your tips really work. Finally! I was having trouble getting feedburner to see my feeds :)

  21. hekimboard 2008-07-02 / 8.12 am

    thank yusufe ..hekimboard is very good

  22. TPU #7 - Feedburner: Why and How You Should Use It | Podcast Secret Library 2008-12-21 / 9.28 am

    […] Forwarding your feed without an .htaccess file […]

  23. Alarm Sistemleri 2009-02-24 / 3.59 pm

    thanks.

  24. Albatol Network 2009-07-21 / 11.53 am

    Thanks for the article.. nice tips and solved the feed problem

  25. Redirect all feeds to FeedBurner with .htaccess 2009-09-13 / 2.20 am

    […] you have index.php in your permalink structure you have to use a hack. This hack only forwards part of the RSS feeds. To forward all of your feeds to feedburner use this […]

  26. IT CAREER 2009-11-09 / 8.15 am

    Dude your tips really work. Finally! I was having trouble getting feedburner to see my feeds :)

  27. Rapport de Stage 2010-01-23 / 12.49 pm

    Hello
    Your hack doesn’t work for me blog. The feed URL is http://rapport.eric.free.fr/index.php/feed and http://rapport.eric.free.fr/index.php?feed=feed redirect to http://rapport.eric.free.fr/index.php/feed.
    And when I use icon on adress bar,I have http://rapport.eric.free.fr/index.php/feed

  28. photographes mariage portrait à Paris 2010-03-27 / 7.31 am

    Thanks for sharing such a good information,

  29. celebrity fuck you 2010-08-24 / 8.39 pm

    Sign: zdbrw Hello!!! xsgvr and 1425mamvuysudz and 4129 : I love your site. :) Love design!!! I just came across your blog and wanted to say that Ive really enjoyed browsing your blog posts.

  30. prezervatif 2010-09-06 / 12.00 pm

    Thanks for sharing, good info.

  31. Hans Meiser 2010-09-19 / 3.17 pm

    There is obviously a lot to know about this. I think you made some good points in Features also.
    Keep working ,great job!

Sorry, the comment form is closed at this time.

© 2004 - 2024 malyfred