Hi there,
I'm having an issue with a rewrite rule in a production environment seemingly being ignored. I say ignored because, if I change the action to something else (say, a redirect instead), it works as expected.
Below is the rule in question:
<rule name="Reverse Proxy Rule" stopProcessing="true"><match url="^news(.*)" /><conditions trackAllCaptures="true"><add input="{HTTP_HOST}" pattern="^(\w+.)?example.com$" /><add input="{SERVER_PORT}" pattern="80" /></conditions><action type="Rewrite" url="http://{C:0}:81/{R:0}" /></rule>
What I would expect to see when going to http://www.example.com/news/todaysnews, is that this rewrite rule would be triggered, and the content would come from a different site which has a binding for the same domain but on a different port (in this case,
the other site has a binding on port 81.
What I see however is that the original website on port 80 returns the result (a 404), rather than the expected result. However, if I change the action type to be a "Redirect", visiting the above url works and I am redirected tohttp://www.example.com:81/news/todaysnews.
So I know the rule is being hit, and the conditions are being met. However, the action is not being processed.
Any guidance on what I should be looking for is greatly appreciated.