Having trouble with file downloads, using IIS and reverse proxy

Ah alright, thanks! It works now.

For future readers using IIS:

You need to enable preserveHostHeader in your IIS config. (After that you won’t need to set the host header manually in the rewrite rule.)

Simplest way is to execute this command:
"C:\Windows\System32\inetsrv\appcmd.exe" set config -section:system.webServer/proxy /preserveHostHeader:"True" /commit:apphost
Source: https://stackoverflow.com/questions/1842885/modifying-headers-with-iis7-application-request-routing

Setting it in the website’s web.config didn’t seem to work for me, but the command above worked fine.

1 Like