Running IIRF on a per site basis

Aug 24, 2009 at 6:19 PM

Hi, I'm running IIS5.1 and I want to install IIRF for a particular site on my machine. This is my local dev machine and there are several 'sites' running under the root. If I follow the install instructions for adding ISAPI filters to a site I can only add one to the 'Default Web Site' on my server, under which, of course run all the sites on this machine. If I select properties for any of those sites, there is no tab for ISAPI filters so I don't have any options. I figured that I might be able to specify my rewrite rules so that only calls to a particular site were picked up, but I'm not getting the results I want. I think I might have a better chance if I can apply the filter to the one site, but as mentioned above I don't have the option to do it. Any advice?



Aug 24, 2009 at 7:31 PM

Yes, I think you have a misunderstanding.

You are saying that you have "multiple sites" but I don't think you do.   "Site" is a formal term in IIS parlance.   It is used as the unit for administration.  "Sites" will show up under the web server.  If you have WinXP and IIS5.1, then you have the possibility for only a single SITE in IIS.  You can have multiple virtual directories under that site, but only one site.  Windows Server (2003, 2008) allows multiple sites on a single IIS.  I don't think you have Windows Server.

So as a result, you will add the filter only once to IIS. 

Now, I understand that you'd like different sets of rules for different vdirs under your web site.  To do this you need IIRF v2.0.  After you install the IIRF - once!  -  all you need to do is put a distinct IIRF.ini file in the root for each vdir, and that vdir will use the rules in that particular IIRF.ini.  This per-vdir configuration works only with IIRF v2.0.  And note the ini file for IIRF v2.0 is IIRF.ini, not IsapiRewrite4.ini.   Also you can put global configuration in a file called IirfGlobal.ini. 

This is all described in the documentation, check it out.