1

Logging under IIS7 seems to have changed in that access to a parent directory with a default document is now logged differently than IIS6.

The s-uri-stem field appears to ignore whatever documents have been defined in the Default Documents module. According to Microsoft this is by design.

  • Under IIS6, if you were to go to "example.com", the log would show "GET /default.htm - 80".
  • Under IIS7, if you were to go to "example.com", the log file would show "GET / - 80".

For web analytics purposes, we need IIS7 to log access to a parent directory with a default document to log it like IIS6 above.

How can we do that without using URL Rewrite?

1 Answer 1

0

Ideally, your best option is to use the IIS URL Rewrite module. Something like this:

<rule name="Index Request" enabled="true" stopProcessing="true">
    <match url="^$" />
    <action type="Redirect" url="http://domain.com/default.htm" logRewrittenUrl="true" />
</rule>

Another possible solution (I know, this seems a little hack), is to create a different default document page (index.htm for example) and then have a meta refresh tag in the content of that page to send the request to default.htm

<meta http-equiv="refresh" content="0;url=/default.htm">

Other than those options, you might have to write some code to perform the redirect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .