In the context of my plan to move an e107-based website to Wordpress , I need to take care of my RSS subscribers. To let people (and search engines) get my content via old URLs, I will use Apache redirections to do this transparently and permanently. My final goal is to have a Wordpress website with all RSS feeds (blog posts and comments) managed by FeedBurner , to gather statistics about my audience.

Actually there is plenty of feeds format available in e107 (RSS 1.0, RSS 2.0, Atom and RDF) and one feed can be accessed through multiple URLs. We will reduce this incredible mess by using RSS 2.0 feeds only and redirect all others to it.

First, check that the e107 RSS feed plugin is activated. Then create an account on FeedBurner and setup there two feeds, one for your website’s news and another one for comments. Based on default e107 parameters, your news feed URL is like https://www.my-domain.com/e107_plugins/rss_menu/rss.php?1.2 and comments feed like https://www.my-domain.com/e107_plugins/rss_menu/rss.php?5.2 .

Then, create (or edit) the https://www.my-domain.com/.htaccess file, and add following code:

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{QUERY_STRING} ^(5|Comments)
RewriteRule e107_plugins/rss_menu/rss\.php https://feeds.feedburner.com/myfeed-comments? [R=301,L]

RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{QUERY_STRING} ^(1|News|.*)
RewriteRule e107_plugins/rss_menu/rss\.php https://feeds.feedburner.com/myfeed? [R=301,L]

This code is inspired by the one written by Mike Atlas , who had a similar issue and wanted to outsource his e107 forum RSS feeds to FeedBurner  .

The first rewrite rule will redirect all URLs that start with https://www.my-domain.com/e107_plugins/rss_menu/rss.php?5 or https://www.my-domain.com/e107_plugins/rss_menu/rss.php?Comments to https://feeds.feedburner.com/myfeed-comments .

The second rewrite rule will redirect all other URLs that start with https://www.my-domain.com/e107_plugins/rss_menu/rss.php (including https://www.my-domain.com/e107_plugins/rss_menu/rss.php?1 and https://www.my-domain.com/e107_plugins/rss_menu/rss.php?News ) to https://feeds.feedburner.com/myfeed .

That’s all! Thanks to this server-side redirection, nobody will notice that the feeds have moved and no subscriber will be bothered to update their aggregator  .

In my case, the only remaining task to do is to move my e107 website to Wordpress then install FeedSmith plugin . But that’s another story… ;)