Ionic's ISAPI Rewrite Filter

Interested in a freeware URL Rewriter for IIS? Do you wish IIS had a mod_rewrite? IIRF is a small, cheap, easy to use, URL rewriting ISAPI filter that combines a good price (free!) with good features. It is reasonably fast, and reasonably powerful. You can get the source code to inspect it or modify it yourself if you desire. If you use IIS, you can download IIRF and get started right now.

Why Rewrite URLs?

Server-side rewriting of URLs means a URL like http://foo/bar/bam can be translated, on the server, into http://foo/baz/bam.jsp or http://foo/something/dispatch.cgi?q=bam or http://bam/hello/foo.aspx or... anything! The browser is none the wiser.

Rewriting URLs on the server-side goes way back. It has a bunch of advantages:

  • you can use pretty URLs ("Search-engine friendly", "Search Engine Safe" (SES), or "Search-Engine Optimized" (SEO) URLs), with web application platform infrastructure that uses or generates ugly URLs. Some web or portal servers are notorious for generating ugly URLs, but you don`t need to expose them to the world.
  • URLs can stay pretty, even if you change the server-side system (eg, dispatch.fcgi instead of .cgi, or .aspx instead of .jsp).
  • you can migrate or modify sites, without stranding old links.

It`s really convenient with Cold Fusion, PHP, Ruby, Joomla, ASP.NET, JSP or any number of other server-side technologies these days.

Why was IIRF created?

Apache has mod_rewrite, which allows URL rewriting. But IIS doesn`t have anything similar as a built-in, or as a "standard" free add-on.

ASP.NET has a URL mapping mechanism, but it works only for filetypes that are handled by ASP.NET: aspx, ascx, asmx, and so on. For static files or non-ASP.NET files, (xml, gif, jpg, css), the ASP.NET mapping won`t work cleanly.

IIS, like the Apache HTTP server, has an extension mechanism: it is called the ISAPI filter. There are commercial ISAPI filters that endow IIS with the ability to re-write URLs. But you have to pay. There are free ones, but they generally don`t offer regular expression matching, or automatic ini file reloading, or other powerful features. IIRF is a small, cheap, easy to use, URL rewriting ISAPI filter that combines a good price (free!) with good features.

Summary of features of IIRF

  • Easy to afford: there is no fee or cost to use IIRF.
  • Simple to install: just 2 minutes.
  • Simple to configure: put your rewrite rules in a text file, using a simple syntax, similar to Apache
  • Simple to get started: documentation and example RewriteRules are included.
  • Easy to live with: automatic ini file reloading, without IIS restart. [U] unmangle option allows logging of original Search-engine friendly URLs in IIS log files.
  • Flexible: Rewrite rules are specified using regular expressions (provided by the (free!) PCRE library).
  • Capable: RewriteCond is supported, and Redirects are supported (as of v1.2.4). You can chain RewriteCond`s, and you can rewrite based on the state of the underlying filesystem.
  • Easy to adopt: open source, permissive license
  • Works with what you have: works with IIS5 and IIS6, and with web engines like PHP, CGI, JSP, ASP.NET, CFM, and many others.
  • Easy to understand, audit, or modify: It is implemented in about 2000 lines of commented C code.
  • Easy to build: compiles with Microsoft Visual Studio 2005 or with the (free) Microsoft VC++ 2005 Express compiler.
  • Not implemented with MFC 

Visit Ionic`s ISAPI Rewrite Filter homepage

For a demo...take a look at this site rewritten urls 

right_top

About this blog...

Archives

Previous Month (September) October 2007  Next Month (November)
SMTWTFS
 123456
78910111213
14151617181920
21222324252627
28293031   

Poll