Helicon Ape - The Bridge Between Apache and IIS

Ok, before we begin, let's get one thing straight — I am a programmer, not a network administrator. I can definitely hold my own when it comes to setting up a server and maintaining it but I have no desire to get into the inner-workings of server security, management and and administration. Furthermore, I find it increasingly difficult to stay on top of the ever-changing IIS and all of its complexities.

Its becoming more and more common to do some level of URL rewriting or redirecting on each site I work on, and while doing this on my local instance of Apache is a piece of cake using mod_rewrite, I've been grasping for straws when it comes to deploying my code to my production servers running IIS. I recently migrated a few dozen sites from various versions of IIS 6 and under to a newer IIS 7.5 box. We were running an older (yet stable) version of Ionics Isapi Rewrite Filter to handle our basic url rewriting and redirecting needs.

What is URL Rewriting

Simply put, URL rewriting allows you to take an ugly URL and "mask" it with a pretty URL. Let's look at an example:

// Ugly URL http://www.ryanjeffords.com/post.cfm/coldfusion-and-basecamp-s-api

Technically speaking there's really nothing wrong with this URL. I'm personally not a fan of having "file names" act as "directories" though. The good news is, with a little work you can easily rewrite this URL to something much cleaner and more descriptive from a search engine standpoint.

// Pretty URL http://www.ryanjeffords.com/blog/entry/coldfusion-and-basecamp-s-api

As you can see, we replaced the "post.cfm" with "blog/entry" which gives us a better understanding of exactly what this URL will lead us to without even having to click it. So how does this work? Magic? No! But more on that later.

Helicon Ape to the Rescue!

While IIRF had proven plenty stable for our basic URL rewriting needs over the past several years, I ran into a pretty frustrating problem on our new server running IIS 7.5 and the latest version of IIRF. After troubleshooting for a few hours and coming up empty I decided to branch out and try another product.

Helicon ApeI had recently used a product called Helicon Ape for another project I was working on. Getting right down to the point, Ape allows me to run a set of familiar Apache modules on my instance of IIS all using the simplistic approach of editing an .htaccess file. Seems too simple right? Nope!

To get started, download Ape and use the "so easy a caveman could do it" .msi file to point and click your way through the installation process. Soon you'll see a new ISAPI filter installed within IIS. Click Start > All Programs > Helicon > Ape > Manager and you'll immediately see a quick list of every site you have configured in IIS in the drawer on the left. Click on a site and you'll be able to immediately edit the .htaccess file for that site. From my example above, the following rule will allow me to type the pretty url into my browser, have the web server translate that url to the ugly url, and finally pass me back the content all without revealing the ugliness of the ugly url. Here's the simple 1 line of code I used:

RewriteRule ^blog/entry($|/.*) post.cfm$1 [L]

So What Else Can Ape Do?

Ape uses mod_rewrite to do URL rewriting. mod_rewrite is probably one of the most popular Apache modules and most used URL rewriting tool available. The rules are a piece of cake to write and are pretty bullet proof. Ape also offers a slew of other modules to perform various forms of functionality from caching to security authentication to developer debugging. The beauty is that just like Apache, everything can be configured right from your .htaccess file.

Conclusions

Sure IIS 7.5 has come a long way and probably offers many comparable features natively, but for those who are used to the simplistic configuration of Apache, Ape is your golden ticket. I personally use Apache for my local development environment, and to be able to simply move my .htaccess from local to production without any further configuration is priceless. Well...almost... The one downside to Ape is that it isn't entirely free.

If you run less than 3 sites, Ape is FREE, but for those who may have a more robust web server setup, Helicon offers pricing on a few levels. ($29 site license or $99 server license with volume discounts available) Small price to pay for a pretty awesome product — I should know, I've purchased two server licenses.

0 responses to “Helicon Ape - The Bridge Between Apache and IIS”

Leave a Reply

Leave this field empty:

Back to Top

Before you download my resume...

My Current Employment Status

I am currently happily employed and not actively seeking employment at this time. While I appreciate any and all interest in my skill-set, I am currently not available for a full-time hire. If you are interested in my skill-set and would like to hire me on a part-time basis, please contact me.

Contact Information

To avoid having my personal contact information floating freely through-out the internet, I have withheld my personal contact information from my resume. If you are interested in contacting me, please do so on my contact page.

Find Me, Follow Me, Friend Me!

Tags

Fellow Bloggers

Brought to you in part by

Epicenter Consulting - A Web Application Design and Strategy Firm