How to use FeedBurner with WordPress without .htaccess file
What is 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.
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
- 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
- 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.
- 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.