Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.