Ionic's Isapi Rewrite Filter
Ionic's Isapi Rewrite Filter
, aka IIRF, is a small, FREE, easy to use, URL rewriting ISAPI filter. It combines a good price (free!) with good features. It is fast and powerful. It works on IIS 5.0, 5.1, 6.0, and 7.0. If you use IIS, you can download IIRF and get started right now
Did you know? IIRF is DonationWare
If you find IIRF useful, consider donating. IIRF is still free, no-charge, and open-source, but I am now accepting donations
on behalf of my favorite charity. The concept is called "DonationWare".
IIRF is being actively maintained based on Community input, and the project is open to contributors. If you would like to contribute requirements - please use the Issue Tracker. If you have questions, use the Discussion forums.
Online helpfile for IIRFExample INI Files
Frequently Asked Questions (FAQ)
What is URL Rewriting?
That's a big topic, so I'll direct you elsewhere for the answer. Wikipedia
has a good entry on the subject.
This is a really good overview
, geared toward Apache mod_rewrite, but the concepts apply to all rewriters.What is URL Rewriting good for?
Lots of things. Some people use IIRF to allow his community site to expose Search-Engine-Friendly URLs. One person used IIRF to get SharePoint Search to work properly with HTTPS URLs. There are lots of uses. If you use IIS, you can use IIRF to map between the URL the browser enters, and the URL the server "sees". Why was IIRF created?
Apache has mod_rewrite, which allows URL rewriting. But IIS, prior to v7, 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 configuration 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. What does IIRF Look like? How do I use it?
IIRF is a single DLL. You install it as an ISAPI Filter on your web server. You configure it with a text-based INI file. What is the license for IIRF?
IIRF is released under the Microsoft Permissive License (Ms PL). Click the License tab on the codeplex site to learn more.Does IIRF support regular expressions for rewrite rules?
Yes. a Perl-compatible regular expression syntax is supported, with negative and positive look-aheads, look-behinds, conditionals, and so on. Outstanding! Where does the regular expression support come from?
It comes from the open-source PCRE
library. Ok, wait, what's a regular expression?
Again I will defer to Wikipedia
on that topic. Regular Expressions define a language for matching text patterns. It can be challenging to use Regular Expressions if you're not a geek. Be careful, do your homework. Ok, What versions of Windows and IIS does IIRF work with?
Windows XP with IIS 5.1, Windows Server 2003 (including R2) with IIS6, Windows Vista SP1 with IIS7, and Windows Server 2008 with IIS7. But seriously, Why do we need IIRF? There are already free rewriting filters.
There various other rewrite filters for IIS. Each of them has advantages and disadvantages. IIRF is another option. Some of the advantages of IIRF: IIRF is free and open source. IIRF supports regular expressions, for power in rewriting. IIRF does auto-reloading of the rules files. The other options in rewriting filters don't have this combination of capabilities. At the same time, IIRF has limitations. For one thing, it lacks a commercial support mechanism. So... it's your choice.Does using IIRF require that I install the .NET Framework on the server in order to use it?
No. I think the .NET Framework is cool, but IIRF does not depend on the .NET Framework.Does IIRF require .NET on my workstation in order to build it?
No. IIRF does not depend on the .NET Framework.Why doesn't IIRF use the Regular Expression library in the .NET Framework?
IIRF is built in C, and is designed to be small, native, and fast. IIRF is not built in managed code, hence we cannot rely on the .NET Framework for anything, including regular expressions. Why wouldn't you use .NET managed code for a rewriting filter?
Because in IIS5 and IIS6, ISAPI filters are written in unmanaged code. There's no programming model for managed code ISAPI filters. This is different in IIS7, but still, some people don't want to install or run .NET applications on their web servers. What do I have to install on my server in order to
Of course Windows is a pre-requisite: Windows Server 2003 or 2008, Windows XP or Vista. Also you'll need IIS itself. And then the IIRF ISAPI dll. Where can I find the documentation for IIRF?
There's a CHM file that provides all the doc. It describes the features and how to use them. You can also view the helpfile onlineI cannot view the CHM documentation. The error is: "This program cannot display the webpage." or, "The address is invalid." or, "Navigation to the webpage was canceled" Is there an error with the chm file?
No, there is no problem with the CHM file. You have likely encountered a problem with Windows protection of files downloaded from less trusted locations. To view the chm file, within Windows Explorer, right-click on the CHM file, select properties, and Unblock it (button in lower part of properties window).If I want to download the source and compile my own version of IIRF, must I install and use Visual Studio on my developer workstation?
No. IIRF is a small set of code files and it ships with a makefile for building. There's no Visual Studio solution, so in fact, you can't use Visual Studio to build IIRF. IIRF builds from the command line with a makefile. To run the make, you need the Windows SDK
, and the Microsoft C/C++ compiler, version 8 or 9. You can get that compiler from an installation of Visual Studio
, including the (free, no charge) Visual Studio C++ Express edition
, but you will not build IIRF from within Visual Studio. Must I install Visual Studio if I want to contribute to IIRF, or build the source code?
No. There is a makefile that you can use to build IIRF. It builds with the compiler included in the (free, no-charge) Visual Studio C++ Express edition
. If you want to debug the resulting filter, then you may want the full Visual Studio tool. Can I use IIRF with PHP urls?
Yes. and CGI, and ASP, and ASP.NET, Joomla, and Mambo, and Ruby, and JSP, and ColdFusion, and a zillion other IIS plugins.
See the RORIIS
project for an example of a Ruby-on-Rails framework for IIS that uses IIRF.Can I use IIRF to prevent people from directly linking to the image files on my site?
Yes, and you can prevent SQL injection hacks, and you can do lots of other things. Check the readme or the chm doc for more information.