Hi,
I've been fiddling with this for a while now. In IIS 7.0 it works fine, but not below that.
On IIS 6.0 for example, when I call GetServerVariable on APPL_PHYSICAL_PATH I get a return code of 13 (which maps to ERROR_INVALID_DATA which is nowhere in the docs I read)
when I call GetServerVariable with APPL_MD_PATH, PATH_INFO or PATH_TRANSLATED, it returns an empty string.
again, all the above work fine in IIS 7.0
INSTANCE_META_PATH and URL returns ok.
I'm working on an url rewrite filter, which now has a configuration file per site and possible per directory. something like apaches .htaccess, but this is a filter config file.
I need the root of the site on disk so I can translate the url root to a physical path and read the config.
all this must be done in preproc headers as I need the config before I rewrite (or not, depending on some config entries) the url.
If there is no configuration option or other ways of making the getservervariable to behave as in 7.0, how can I get the root directory of a site or virtual folder, working on all IIS versions, or at least below 7.0?
Start Free Trial