URL Redirect losing HTTPS status after redirect RRS feed

  • Question

  • User-1835711784 posted
    Hi We have a rule that redirects all inbound traffic matching a particular URL structure to a modified version of the same URL: <rewrite> <rewriteMaps> <rewriteMap name="StaticRewrites"> <add key="/stores/mystore/(.*)" value="/home/stores/mystore/{C:0}" /> </rewriteMap> </rewriteMaps> <rules> <rule name="Redirect /Stores/mystore" stopProcessing="true"> <match url="^stores/mystore/(.*)" /> <action type="Redirect" url="home/{R:0}" /> </rule> </rules> </rewrite> The redirect works fine apart from one thing - if a request comes in over HTTPS, it is redirected to HTTP! So for example: https://www.mydomain.com/stores/mystore/script.js is being redirected to http://www.mydomain.com/home/stores/mystore/script.js, which is playing havoc with our SSL certificates. Any ideas? Thanks in advance, Simon
    Tuesday, March 13, 2012 5:35 AM


  • User-1835711784 posted
    Ignore this post - we have just realised that our load balancers are terminating the SSL connection and so are not passing the request to IIS over HTTPS, which means IIS does the redirect over HTTP.
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, March 13, 2012 5:38 AM