It's been a week since my last post. An unplanned blogging vacation due to work schedules, travel and the side project of deciding what I'm going to do with this blog. From a technology perspective, at least. I doubt there's any hope that something can be done for the content. It's a lost cause. ;-)
One of the challenges I've faced with looking at different blogging engines (whether it be an upgrade to CommunityServer or a migration to something like WordPress) is how I can make such a change without alienating the 3 of you that subscribe to the blog and without breaking Goggle results. #2 is a big one - broken Google results annoy the p!ss out of me.
Well, the URL is easy. I just need to configure the new system in the root of the RoudyBob.NET domain.
The RSS feeds, though, are a bit more challenging. Different pieces of software handling RSS feeds and the links to them differently - Wordpress, for example, provides the RSS feed at your domain name/wp-rss2.php from what I can tell. I'm sure I could change this to match the existing feed of .../rss.aspx but that would cause all sorts of confusion with the web server's HTTP handlers since I hope (in the event that I migrate to WP, anyway) to keep the existing site intact and just "overlay" the WP software into the same directory structure. That means being able to service both ASP.NET requests as well as PHP requests appropriately.
A better solution, IMO, is to leverage a service such as FeedBurner.com to obfuscate what's really going on from a RSS perspective on my site. If I change things on my side, I merely need to point the RoudyBob.NET FeedBurner feed to the new URL. My readership is none the wiser... The challenge is this: how do I redirect everyone that currently visits the site via a news aggregator to the new FeedBurner feed? After a few hours of tinkering, I discovered this is pretty straightforward with .Text and requires only 2 lines of new code. And I'm stretching by calling it "code". It's brain-dead simple. As a matter of fact, if you're reading this in your news agreggator or via some other sort of RSS/ATOM magic, it worked without a hiccup!
Here's how I went about it:
Setup an account at FeedBurner.com.
I modified the web.config in the root of the .Text installation to handle requests for rss.aspx and atom.aspx differently. I created static rss.aspx and atom.aspx files for the purposes of my trickery, so this is the "backdoor" to access the dynamic RSS and ATOM feeds that .Text provides. There are two lines in the first HttpHandlers section of the web.config file that handle RSS and ATOM requests. I changed the "rss\.aspx" portion to "rss2\.aspx" and changed the "atom\.aspx" portion to "atom2\.aspx". I then saved the file...
My original RSS and ATOM feeds were now broken. I could still get access to the content, though, by going to http://www.roudybob.net/rss2.aspx or http://www.roudybob.net/atom2.aspx. Installation of syndication "backdoor" successful.
The next trick was to take any request to http://www.roudybob.net/rss.aspx or http://www.roudybob.net/atom.aspx and redirect them to the new feed. I did this by simply using a text editor to create a new rss.aspx and new atom.aspx and put them in the root of my blog directory. In those two files, I had two lines of VBScript (note, I can't figure out how to print the actual code as it gets messed up and turned into HTML):
Language="VBScript"
response.redirect ("http://feeds.feedburner.com/roudybob")
UPDATE: I've taken a screenshot of my editor windows with all three files open (atom.aspx, rss.aspx, web.config) if you're interested in seeing the actual syntax of the code I'm talking about here. And if you're smart like Ryan and know how to make code look pretty when you post it, I'd welcome any suggestions! Here is the link to the screenshot (JPG) - 135K (1024x768).
This VBScript simply redirects client requests to the specfied URL. Easy, huh?
Configured the FeedBurner.com feed to point to the "new" RSS feed on my site - living at rss2.aspx. This is a very important step! Do not direct the FeedBurner.com feed to .../rss.aspx. If you do, you will create an "infinite loop" situation. The old RSS feed of the site will redirect users to the FeedBurner feed which is pulling it's information from the old RSS feed of the site and so on...
That was it - I had accomplished my goal of redirecting my RSS readership to a different RSS Feed!
You could use this for more than just redirecting people to a FeedBurner.com feed...it could be used in any situation where you need to "covertly" redirect people to a different URL.