Reputation: 2160
I set up an IIS server (IIS 8) and added URL Rewrite.
If I set:
Requested URL: "Matches the Pattern"
Using: "Regular Expressions"
Pattern: "(.*)"
No conditions
Action Type: "Redirect"
Redirect URL: "http://myloadbalancer_censored_name.elb.amazonaws.com/"
Redirect Type: "Temporary (307)"
This works the way I would expect.
When I type the url in my browser (something like "http://10.0.1.47") my browser's omnibar changes to the redirect URL (something like http://myloadbalancer_censored_name.elb.amazonaws.com/).
So far so good ...
But when I change the setting in URL Rewrite from redirect to rewrite, I get back:
HTTP Error 404.4 - Not Found
Requested URL
http://10.0.1.47:80/
Physical Path
C:\inetpub\wwwroot
I'm trying to set up a reverse proxy to pull web resources as if they came from a separate machine (to hide the internals of where my web app server actually lives).
EDIT:
In the IIS log I can see these 2 lines:
2016-04-06 15:59:34 10.0.1.11 GET / - 80 - 10.0.1.11 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 4 123 15
2016-04-06 16:01:07 10.0.1.11 GET / - 80 - 10.0.1.11 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 307 0 0 46
The first one is with rewrite. The second one is with redirect. This shows I am hitting the same IP, but it fails with rewrites for some reason.
Upvotes: 0
Views: 804
Reputation: 2160
Select the root level server in Internet Information Manager (IIS) and select Application Request Routing Cache.
Click “Server Proxy Settings …” on the right most pane.
Check “Enable Proxy”.
Upvotes: 1