IIS ISAPI Redirect using Relative not Absolute URL

Jeff Phillips 1 Reputation point

I'm using IIS as the frontend for a tomcat process running my CA service. An ISAPI redirect is used to pass the queries to the tomcat workers matching the URL /csrscep/... In our lab we have two devices from different vendors, the first works fine and uses HTTP/1.1 and a relative URI in the GET method:
GET /csrscep/123?operation=GetCACert&message=GetCACert HTTP/1.1 HOST=

The non-working device uses HTTP/1.0 and an absolute URI in the GET method:

For the first device the isapi handler passes the RequestURL=/csrscep/123 and the tomcat workermapper.properties correctly maps to the worker for /csrcsep

For the second device the isapi handler passes the RequestURL= which causes tomcat to report the error "URI does not begin with '/'" which is the result of the tomcat normalize servlet.

It's not possible to change the request behavior of the second device so I was trying to find a way to rewrite the RequestURL that is passed to the ISAPI Redirect handler but have not had any success. URL Rewrite looks only at the portion after the '/' so I tried to make a generic match all "(^.*)" pattern to match all URLs and rewrite the same value "{R:0}" hoping that it would recraft the RequestURL. This doesn't seem to be the case and looking at the failedRequest tracing log I surmise that the IIS processes are correctly parsing out the relative URI but passing the original absoluteURI to the isapi redirect module.

Any suggestions on how to rewrite the request prior to the isapi redirect module to correct the observed behavior?


Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
3,414 questions
{count} votes