5
votes

In IIS I've set up a basic URL Rewrite with an Inbound rule to perform a Rewrite action to another domain:

Pattern match: ^somedirectory/(.*)

Action type: Rewrite

Rewrite URL: http://www.google.com/{R:1} (using google just as a test)

The problem is, how can I actually see what the server has rewritten the URL to? When I check the IIS logs (I have "Log rewritten URL" option ticked), I would expect to see www.google.com somewhere - but it's nowhere to be found.

The pattern is definitely matching because I get the error: "502 - Web server received an invalid response while acting as a gateway or proxy server."

How can I see what is going on behind the scenes (how IIS has changed the request)?

1
You can check it at this location %SystemDrive%\inetpub\logs\LogFiles\{Site}koopar

1 Answers

2
votes

One way is to enable "Failed Request Tracing" is IIS.

For the status code choose a range like 100-999 to capture all requests (even non-failing).

IIS will create an XML file for each request to a log directory. The XML can be viewed nicely within Internet Explorer (try the compact view tab).