<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>All About Interop : IIRF</title><link>http://blogs.msdn.com/dotnetinterop/archive/tags/IIRF/default.aspx</link><description>Tags: IIRF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>IIRF v1.2.15 is released - open source URL Rewriting on IIS6</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/10/15/iirf-v1-2-15-is-released-open-source-url-rewriting-on-iis6.aspx</link><pubDate>Wed, 15 Oct 2008 17:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000075</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/9000075.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=9000075</wfw:commentRss><description>&lt;P&gt;I have &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2008/06/18/rewriting-urls-on-iis5-iis6-or-iis7-mod-rewrite-on-iis.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2008/06/18/rewriting-urls-on-iis5-iis6-or-iis7-mod-rewrite-on-iis.aspx"&gt;previously written about IIRF&lt;/A&gt;.&amp;nbsp;&amp;nbsp; Here I go again:&amp;nbsp; IIRF has now has been updated to v1.2.15.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;IIRF is &lt;STRONG&gt;&lt;A class="" href="http://www.codeplex.com/IIRF" mce_href="http://www.codeplex.com/IIRF"&gt;Ionic's Isapi Rewrite Filter&lt;/A&gt;.&amp;nbsp; &lt;/STRONG&gt;It&amp;nbsp;is a small, cheap, easy to use, URL rewriting ISAPI filter that 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.&lt;/P&gt;
&lt;P&gt;You may have heard about the &lt;A class="" href="http://blogs.iis.net/bills/archive/2008/05/31/urlrewrite-module-for-iis7.aspx" mce_href="http://blogs.iis.net/bills/archive/2008/05/31/urlrewrite-module-for-iis7.aspx"&gt;Rewriting Module for IIS7&lt;/A&gt;&amp;nbsp;from Microsoft.&amp;nbsp; This is not that thing.&amp;nbsp; This is a rewriter for IIS6 or 7.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It works with regular expressions. It's fast.&amp;nbsp; It's written in C. It's open source.&amp;nbsp; It does not require the .NET Framework.&amp;nbsp; It works with PHP, Ruby, ColdFusion, JSP, ASP.NET, and anything else you can run on IIS. &lt;/P&gt;
&lt;P&gt;Check it out. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9000075" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIRF/default.aspx">IIRF</category></item><item><title>Rewriting URLs on IIS5, IIS6, or IIS7 (mod_rewrite on IIS?)</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/06/18/rewriting-urls-on-iis5-iis6-or-iis7-mod-rewrite-on-iis.aspx</link><pubDate>Wed, 18 Jun 2008 15:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8617138</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8617138.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8617138</wfw:commentRss><description>&lt;P&gt;A couple weeks ago, Bill Staples made a splash when he announced a Rewrite Module for IIS7: &lt;A href="http://blogs.iis.net/bills/archive/2008/05/31/urlrewrite-module-for-iis7.aspx" rel=nofollow&gt;&lt;FONT color=#777777&gt;http://blogs.iis.net/bills/archive/2008/05/31/urlrewrite-module-for-iis7.aspx&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;But you can get mod_rewrite -like capability, even&amp;nbsp;on IIS6, using &lt;A href="http://iirf.codeplex.com/" mce_href="http://IIRF.codeplex.com"&gt;the free IIRF download&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Rewriting URLs?&amp;nbsp; This is the magic in your web server that allows your user to type something neat and clean, like &lt;A href="http://server/products/WidgetX"&gt;http://server/products/WidgetX&lt;/A&gt;&amp;nbsp;, but yet on the server side it is served by a page that would normally be available like so: &lt;A href="http://server/ProductQuery.aspx?productName=WidgetX"&gt;http://server/ProductQuery.aspx?productName=WidgetX&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;URL Rewriting has lots of benefits, one of which is search-engine optimization.&amp;nbsp; the URL Rewriting module for IIS7 is therefore is very interesting for lots of people. Definitely check it out if you are using Windows Server 2008, or Windows Vista (either of which is a pre-req or IIS7).&amp;nbsp; Some of you are not yet in that boat.&amp;nbsp; You're still running Windows Server 2003, or you are running a public&amp;nbsp;IIS website on Windows XP (Shocking, maybe, but very common).&amp;nbsp; You're not on IIS7, yet you still want URL rewriting.&amp;nbsp; You want it all, don't you?&lt;/P&gt;
&lt;P&gt;You've seen the&amp;nbsp;guidance on how to do&amp;nbsp;this with a .NET HttpModule, but you don't want to run every URL through&amp;nbsp;ASP.NET.&amp;nbsp; Maybe you don't even have ASP.NET installed on the machine?&amp;nbsp; Maybe you are running a website with Ruby, or PHP.&amp;nbsp; Maybe it is a Joomla thing, or ColdFusion.&amp;nbsp; Whatever, you're running Windows and IIS6 or IIS5, and you want URL rewriting.&amp;nbsp; The .NET approach isn't the right thing, and the IIS7 module is a non-starter.&amp;nbsp; What other choices have you got?&lt;/P&gt;
&lt;P&gt;As BillS points out in his blog post, there are commercial providers of IIS Filters. They have fine products, good documentation, good support staffs and policies.&amp;nbsp;&amp;nbsp; There are other options.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;A long while ago I &lt;A href="http://blogs.msdn.com/dotnetinterop/archive/2006/08/16/mod-rewrite-for-iis.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2006/08/16/mod-rewrite-for-iis.aspx"&gt;posted about a URL rewriting ISAPI &amp;nbsp;Filter&lt;/A&gt;.&amp;nbsp; I put it together as a sort of proof that it could be done, but then people wanted to really use it.&amp;nbsp; So I called it IIRF, promoted it to a codeplex project, and of course in keeping with the codeplex philosophy, it is open source.&amp;nbsp; I've been maintaining IIRF on the side ever since then, adding features, fixing bugs and providing guidance on how to use it in the forums on the codeplex project site. &lt;/P&gt;
&lt;P&gt;I wanted to provide an update here.&amp;nbsp; There's now&amp;nbsp;a &lt;A href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13940" mce_href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13940"&gt;v1.2.14 release&lt;/A&gt; of IIRF, available on codeplex. It is the latest stable release. (you can always click to &lt;A href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx" mce_href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx"&gt;Latest Stable&lt;/A&gt; release) This one works on IIS5 or 6 or 7.&amp;nbsp; There's no installer nor is there a graphical rules designer. But it works nicely, and performs well.&amp;nbsp;&amp;nbsp; It does rewrites and redirects, based on a regular-expression powered pattern-matching capability (provded by &lt;A href="http://www.pcre.org/" mce_href="http://www.pcre.org"&gt;PCRE&lt;/A&gt;).&amp;nbsp; The config resides in a text file with a syntax much lilke but not exactly the same as the ini file for mod_rewrite on Apache HTTPD, and it is automatically reloaded each time you modify it.&amp;nbsp; It has the -f and -d features from Apache's mod_rewrite, features that are not present on some commercial filters.&amp;nbsp; The IIRF documentation isn't fancy, but the readme is clear and complete.&amp;nbsp; There's a tool for testing out the RewriteRules.&amp;nbsp; IIRF has a log feature that lets you see what the filter is doing, if you like. &lt;/P&gt;
&lt;P&gt;There's also a &lt;A href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13946" mce_href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13946"&gt;1.2.15 release&lt;/A&gt;, currently in preview. This one adds a RewriteHeader feature, which is nice.&amp;nbsp; It lets you set any arbitrary HTTP Header in the request, based on the same kinds of conditions and pattern matching that you use to rewrite URLs. &lt;/P&gt;
&lt;P&gt;One of the biggest feature requests I got was to allow the filter to be installed once, but have many distinct configuration settings, for different websites, different web applications in IIS.&amp;nbsp; What it means is you install the filter once, and then you can have 50 or 100 (or more) different ini files, each with its own rewriting rules.&amp;nbsp;&amp;nbsp;Great for hosters or consolidated servers where many apps are running on a single instance of IIS.&amp;nbsp; This new feature is available in&amp;nbsp;the&amp;nbsp;&lt;A href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=14394" mce_href="http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=14394"&gt;v2.0 release&lt;/A&gt;, also currently in preview. (The feature required&amp;nbsp;a redesign of the way the configuration was slurped in, and&amp;nbsp;I felt this was significant enough to warrant a new major version number.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Definitely check out IIRF if you want a cheap Rewriting filter for IIS, with a good feature set. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8617138" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIRF/default.aspx">IIRF</category></item><item><title>Apache mod_rewrite for IIS  (IIRF)</title><link>http://blogs.msdn.com/dotnetinterop/archive/2006/08/16/mod-rewrite-for-iis.aspx</link><pubDate>Wed, 16 Aug 2006 15:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:701634</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/701634.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=701634</wfw:commentRss><description>&lt;H3&gt;mod_rewrite for IIS &lt;/H3&gt;&lt;FONT size=2 face=Tahoma&gt;&lt;!-- ------------------------------------------------------- --&gt;&lt;SPAN style="FONT-FAMILY: Tahoma; COLOR: red; FONT-SIZE: 10pt"&gt;&lt;I&gt;[Update, 2008 June 18: Due to very strong interest, this rewriting filter was moved to an open-source project hosted on codeplex, in 2006. Called IIRF, it is the closest thing to Apache mod_rewrite for IIS.&amp;nbsp; It now includes a number of advanced features, and can be used with wordpress, PHP, JSP, ASPX, joomla, and many other server technologies. I've been maintaining it with regular releases and updates, and it's still &lt;STRONG&gt;FREE&lt;/STRONG&gt;. Find it at &lt;A href="http://www.codeplex.com/IIRF"&gt;www.codeplex.com/IIRF&lt;/A&gt;] &lt;/I&gt;&lt;/SPAN&gt;&lt;FONT size=2 face=Tahoma&gt;&lt;/FONT&gt;
&lt;P&gt;Something worth checking out - if you have used the &lt;A href="http://httpd.apache.org/" mce_href="http://httpd.apache.org/"&gt;Apache web server&lt;/A&gt;, or even the ASP.NET HTTP Handler (.ashx) &lt;A href="http://www.markberck.nl/article_b41287bc-8c90-48a1-b469-d6871e8864fc.aspx" mce_href="http://www.markberck.nl/article_b41287bc-8c90-48a1-b469-d6871e8864fc.aspx"&gt;article1&lt;/A&gt; , you may be aware of the concept of rewriting URLs. The idea is that a browser or other web client sends a simple URL request to a server, and then on the server side, that inoming URL can be mapped or transformed to a totally different URL, possibly a much more complex URL, on the server. A request for http://server/MyPicture.jpg sure looks like it refers to a static file on the server. But on the server, that request might get mapped to TheNewPicture.jpg, or might even be handled by program logic that dynamically generates the requested image, performs some auditing, and so on. &lt;/P&gt;
&lt;H4&gt;Why Map or Rewrite URLs? &lt;/H4&gt;
&lt;P&gt;Mapping between client-side, browser-visible URLs and the actual server-side URLs - Why would anyone want to do this? Lots of reasons, including - maybe you want to modify your site, and change the way you handle certain requests, but don't want to change the original URLs. Another very common reason is that some portal and community site frameworks introduce really ugly, lengthy, hard to remember URLs, and you might want to spare your users the need to type all those things in. A related reason - some search crawlers won't index dynamic pages - pages that have more than a few parameters in the query string. A dynamic page like page.aspx?id=7182&amp;amp;map=17&amp;amp;uid=jueww&amp;amp;confirm=diu8hjfdj might get passed over by the search engine crawler, whereas a page with a simple URL like Confirmation.aspx might get indexed. There are lots of other reasons, too. Maybe you want to provide different results depending on the requesting host, or the time of day, or based on some other conditions. You may be thinking - "I can do all of these things through some relatively simple custom server-side logic," and you are correct. URL Rewriting is just another option, and it may or may not be interesting or useful to you. IT may be a complement to, or a replacement of, custom server-side logic, whether you use ASP.NET, JSP, PHP, or something else. &lt;/P&gt;
&lt;H4&gt;Apache's Mod_Rewrite &lt;/H4&gt;
&lt;P&gt;There is an extension module for the Apache HTTP Server that provides a declarative way to rewrite URLs: &lt;A href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html" mce_href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html"&gt;mod_rewrite&lt;/A&gt;. It's very powerful and pretty well known. The way it works: you configure all the rules for rewriting URLs in a text file. At runtime, the module parses the text file and then applies those rewrite rules to incoming URLs. A simple model, though the configuration can be tricky. &lt;/P&gt;
&lt;P&gt;You can match incoming URLs based on &lt;A href="http://www.regular-expressions.info/" mce_href="http://www.regular-expressions.info/"&gt;Regular Expressions&lt;/A&gt;, which is a language unto itself. You can apply conditions to rewrite rules - Rules might or might not be applied, depending on the requesting host, the time of day, or the state of the filesystem. You can chain conditions together. Like I said, powerful, but tricky. &lt;/P&gt;
&lt;P&gt;It works only on Apache. &lt;/P&gt;
&lt;H4&gt;What about IIS? &lt;/H4&gt;
&lt;P&gt;I've heard from a number of IIS users and administrators that would like similar capability on IIS, and would like it for a similar cost (free). &lt;/P&gt;
&lt;P&gt;ASP.NET HTTP Handlers can be used to do URL Rewriting. If you like, you can map *any* extension to your custom HTTP Handler, and handle it in .NET code. So, stuff like .jpg images or other binary types can be handled in managed code. That's nice, but some people do not run ASP.NET on their servers, and don't want to. Also, using the .ASHX approach essentially means the declarative model of Mod_rewrite is replaced by a programmatic model - in other words you would have to be a developer to use a rewriter build on this stuff. There are &lt;A href="http://www.urlrewriting.net/" mce_href="http://www.urlrewriting.net"&gt;third parties&lt;/A&gt; who have written configurable rewriters based on ASP.NET in the spirit of mod_rewrite, which is great. Again, though, it requires ASP.NET, which not everyone may want. &lt;/P&gt;
&lt;P&gt;IIS of course, has for many years had the ISAPI programming interface, which allows developers to build extensions and filters into IIS. So you could build a URL rewriter for IIS without ASP.NET. Again, most people don't want to get into that. They'd rather have something to configure. 
&lt;P&gt;There are a number of other rewriters available for IIS, but none that I found that were the right price, with the right features. &lt;/P&gt;
&lt;H4&gt;Ionic's ISAPI Rewriting Filter&lt;/H4&gt;
&lt;P&gt;Getting to the point, &lt;A href="http://cheeso.members.winisp.net/IIRF.aspx" mce_href="http://cheeso.members.winisp.net/IIRF.aspx"&gt;Ionic's ISAPI Rewriting Filter (IIRF)&lt;/A&gt; is a rewriting filter for IIS, along the lines of Apache's mod_rewrite. It is written in C, is relatively small and simple, does not require ASP.NET, supports regular expressions and RewriteCond attributes, and has a bunch of other nifty features. You can compile it yourself using a free compiler available from Microsoft, or using VS2005. &lt;/P&gt;
&lt;P&gt;It works with all sorts of server-side technologies, including ASP.NET, but also with JSP, CFMX, PHP, Ruby, and frameworks built on same, including Joomla (Mambo) and others. It's easy to set up. It works on WinXP and WS2003. &lt;/P&gt;
&lt;P&gt;IIRF is free and open-source, with a BSD license. I am in the process of setting up IIRF as a project on CodePlex . &lt;/P&gt;
&lt;P&gt;&lt;A href="http://cheeso.members.winisp.net/IIRF.aspx" mce_href="http://cheeso.members.winisp.net/IIRF.aspx"&gt;Check it out. &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;-Dino &lt;/P&gt;&lt;/FONT&gt;&lt;!-- ------------------------------------------------------- --&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=701634" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/IIRF/default.aspx">IIRF</category></item></channel></rss>