ISAPI and path of the web
Posted on 1998-11-10
I have an ISAPI extension, which, among other things, parses a HTML file and modifies it. My problem is the use of path in the template file.
I'm running on a NT server with IIS4. My ISAPI is located in the /SCRIPTS directory and my web is called /NEWS. The structure of /NEWS is something like this:
In my HTML template file, image references is in the form images/picture.gif. The problem is that when the ISAPI has processed the file, /SCRIPTS is the default directory and since there is no /images directory underneath, no pictures are shown in the browser. The only solution I have found so far, is to make the image reference like /news/images/picture1.gif, but adding the webname to the template file won't do, as the file are copied to a number of other webs on the same server and I don't want to edit each file everytime I change something.
Isn't there some like "/root-of-current-web" tag I can use? I can't use / since I have a number of webs on the server and / returns the IIS root.
I'll up the points for a good solution..