isapi_rewrite on IIS 5

Jul 28, 2009 at 3:25 PM

And here comes another strange Problem.


I got the filter working perfectly under an IIS 6. But now I had to change to IIS 5 and there I have a strange issue I cannot understand.


If I install the filter into a website (alias), that shows to a real directory, the filter works fine. But if the website (alias) shows on a Redirect URL, the filter doesn't even notice any


How could this be. It should be the same for the ISAP Filter if the website (alias) shows to an URL or directory. It only should read out the header information ...

Jul 28, 2009 at 4:26 PM

Huh?    I don't know what you mean by

But if the website (alias) shows on a Redirect URL, the filter doesn't even notice any requests.

I don't get this part:   "if the website (alias) shows on a redirect URL".   



Jul 29, 2009 at 8:28 AM

If you create a website alias you can either choose with IIS to map this to a physical folder or redirect it to an URL ... understood this far?

And here is the problem. If the alias shows to a folder (d:\www\) the ISAPI Filter notices the request and decides wheather to take action or not.
And if the alias shows to an URL ( for example, the ISAPI Filter doesnt even notice the requests.

On IIS 6 it works for both.

Jul 29, 2009 at 10:50 AM

Are you saying you have a hard Redirect set in IIS, for a particular URL?

And you want IIRF to handle the request before the hard redirect is enforced?

Maybe you should turn off the hard redirect in IIS?

Jul 29, 2009 at 11:50 AM
Edited Jul 29, 2009 at 1:52 PM

Turn off wouldn't make any sense, because the page that is redirected to (by the way there are many more website aliases in this IIS configured it just works as central point to forward the aliases to serveral Application Servers, that play out JSP sites) can't be played out from IIS.

Heres how it works:


User requests an Alias -> IIS looks for the alias and redirects to the responsible Application Server -> Server parses JSP and sends the displayable page

So the requested page does not lie on an IIS webroot, it lies on another (physical) Server.


On IIS 6 it works like that:

User requests alias -> IIS (with ISAPI Filter activated) looks in Header if there is a known Mobile Header -> If yes it redirects to the mobil page / if no, the typicall redirect of this alias is done.

On IIS 5 it does similar, but:

User requests alias -> If alias shows to a loca folder it does the same as on IIS 6 / If the alias shows on a redirect URL the ISAPI Filter doesn't recognize the request and the alias is forwardet to the non-mobile-page in every case.


IIS5 seems to need a local directory where it shows to, to get the ISAPI Plugin used.

I read, that IIS6 uses a other Apllication Process Model, then IIS5.

Turn off hard redirect is not possible, because IIS wouldn't play out the JSP pages anymore.


I only wanted to know if this used to work like that under IIS 5 (that it only works on directory forwarding and not for hard redirects). I thought the ISAPI filter would monitor the alias itself an not the method how the redirect is done.

Jul 29, 2009 at 1:14 PM

IIS5 has a different filter and process model than IIS6.  Maybe that is the problem.

When I suggest you "turn off the hard redirect" what I mean is, use IIRF to redirect when you need to redirect.   You should not need to register redirection in IIS as well as in IIRF.  If the problem is that IIRF is not getting the URL when run in IIS5, then TURN OFF THE REDIRECT in IIS5, and implement an appropriate RedirectRule in IIRF.

I don't know if "it used to work like this" in IIS5.  Normally when people use IIRF for redirection, they turn off redirection for particular URLs in IIS.  So I've never tested it, the way you have it configured.