IIRF

Ionic's ISAPI Rewrite Filter

 
Do you want a FREE URL Rewriter for IIS?

Do you wish IIS had a mod_rewrite? Check out IIRF.

IIRF is an ISAPI filter that does URL Rewriting for IIS. It's small, FREE, and easy to use. It is easy to install, fast, and powerful. You can get Search-Engine Friendly (SEF) or Search-Engine Optimized (SEO) URLs easily on IIS 6, 7, or 7+. It works with what you have, and there's help available to get you going. You can get the source code to inspect it or even modify it yourself.

Next steps:

Why Rewrite URLs?

Server-side rewriting of URLs means that instead of exposing messy URLs to users and search engines, you can expose clean ones. A URL like

http://server/catalog/QueryProduct.aspx?product_id=3093092

...is too long, is difficult to type, and includes no helpful keywords. It's NOT optimize for search engines. With URL rewriting, even though your e-commerce app expects that kind of URL, you can publicly expose a clean and friendly URL like

http://server/product/3093092/Waring-Blender

Users are happier, search engines are happier, and you will be happier.

Rewriting URLs on the server-side has been a "best practice" for a long time. It has many advantages:

Why was IIRF created?

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

There are commercial ISAPI filters that extend 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.

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. If you don't want to install ASP.NET, then you can't use it.

For IIS7, Microsoft has provided a rewrite module, but it doesn't work with IIS5 or IIS6.

IIRF is intended to fill the gap: it's an easy to use rewriter, and works with all current versions of IIS. It's FREE, open source, and it has regular expression support.

Summary of features of IIRF

All of the features, and how to use them, are described in detail in the help file, which is available for download. A web version of that helpfile is also available, at IIRF Help. There doc is clear and well-written and includes many examples to help you get started.

NB:IIRF does not do forward-proxying or caching.

The IIRF License

Ionic's ISAPI Rewrite Filter (IIRF, referred to as "the software" in the text below) is an add-on to IIS that can rewrite URLs. IIRF and its documentation is distributed under the Microsoft Permissive License, which is spelled out below.

IIRF depends upon PCRE, which is licensed independently and separately.

Microsoft Permissive License (Ms-PL)
Published: October 12, 2006

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

  1. Definitions
    The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

    A "contribution" is the original software, or any additions or changes to the software.

    A "contributor" is any person that distributes its contribution under this license.

    "Licensed patents" are a contributor's patent claims that read directly on its contribution.

  2. Grant of Rights

    (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

    (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

  3. Conditions and Limitations

    (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

    (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

    (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

    (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

    (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
Release history
Version Release DateFeatures
v1.0 2005 January
v1.0.1 2005 July
v1.1 2005 September
v1.2 2006 February
v1.2.2 2006 April bugfix+testing
v1.2.3 2006 May more bugfixes+testing
v1.2.4 2006 May added redirection
v1.2.9 2006 July Added modifier flags like U, R, L, I, F, NF
v1.2.10 2006 Sept special patterns: -d, -f, -s; chaining RewriteCond
v1.2.11 2007 Feb new filter priority, new flow logic
v1.2.12 2007 June improved memory handling
v1.2.14 2008 June bugfixes, reliability work
v1.2.15 2008 October RewriteHeader, RedirectRule
v1.2.16 2009 July CHM documentation, QSA modifier, status URL, bug fixes
v2.0 2009 Novembersite-specific config, ProxyPass, Included ini files, MSI installer
v2.1 (beta) 2010 AprilRewriteMap directive, lexicographic comparisons in RewriteCond

Download

source and binary for all available releases 
As of December 2009, the latest stable version is v2.0, and there is a beta v2.1.

An online version of the IIRF helpfile is available, at IIRF Help. It includes many examples to help you get started.


Questions?

Click Here to Visit the IIRF forums on CodePlex.com

or, Click here to send a comment on IIRF.

 

(click for a printable page)

 


This page has been accessed 143939 times since 24 April 2006