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

Is there a way to log 301 redirects returned by IIS with the (1) request Url and the (2) location Url of the response?

Something like this:

Url, Location

/about-us, /about
/old-page, /new-page

The IIS logs contain the Request Url and the status code (301), but not the location Url of the response. Ideally there would be an additional field in the IIS Log called Location that would be populated when IIS responded with a 301.

In my case the source of the redirect could be ISAPI Rewrite Rules, ASP.NET applications, Cold Fusion applications, or IIS itself. Perhaps there is a way to log IIS response data? Thanks for your help.

share|improve this question

1 Answer 1

All ISAPI_Rewrite can have for this is [U]-flag. It allows you to see the original request, not a redirected already(which you see by default). However there's no way of creating this very customized type of log you've specified.

ISAPI_Rewrite has it's own logs(error.log and rewrite.log), but they are different and used for debugging purposes.

share|improve this answer

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.