Log Location Url Responses of 301 redirects from IIS

iis-7isapiisapi-rewritelogging

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.

Best Answer

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.