I have an IIS setup with redirect rules that work perfectly fine on my Windows machine. However - I'm starting to use Mac - so I installed a VirtualBox VM with windows on it and used the exact same setup. Now the windows VM I got running on VirtualBox for Mac is the same as the same as the physical Windows machine I used so far.
Problem is that the url redirect is not working. From the guest machine (windows) I browse to the URL that should be redirected and it doesn't happen properly. I assume this has something to do with how I configure the network for the virtual machine - do I have to create port forwarding rules? Which ones?
Here's the rule - from web.config (it works just fine on a physical machine):
<rule name="API" patternSyntax="ECMAScript" stopProcessing="true">
<match url="api/.*" />
<action type="Rewrite" url="https://api.MyDomain.com/{R:0}" />
</rule>
Regarding the VM - I defined two network adapters:
1: NAT
2: Host-only Adapter
Note that I have access to the web from the guest machine, I can also access my web service locally - all is fine except for the URL rewrite when the rule is applied.