IIS rewrites my location header :-( RRS feed

  • Question

  • User-2076240800 posted

    I have the following setup.

    SharePoint site running in port 80  (localsite.com:80)

    MVC Application running on port 81

    In IIS I have set up a URL Rewrite so all urls  that start with /MVC goes to port 81

    This works fine.

    The problem is when the MVC application does a simple redirect to any external URL  (Return Redirect("http://www.asp.net")) it then rewrites the location header to be localsite.com:80/.  I assume it is IIS that does this. I dont have any outbound rules. Relative redirects inside application works fine.

    Any ideas how to solve this. Accessing directly to port 81 causes redirect to works fine.

    Thursday, October 1, 2015 7:49 AM


  • User-2076240800 posted

    I got my own answer:

    You have to uncheck the rewrite headers in proxy settings 

    iis > server > Application Requiest Caching -> Remove Reverse rewrite host in response headers

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 1, 2015 8:33 AM