Skip to content

Instantly share code, notes, and snippets.

View andrenascentes's full-sized avatar

Andre Nascentes andrenascentes

  • Porto - Portugal
  • 23:49 (UTC +01:00)
View GitHub Profile
@andrenascentes
andrenascentes / gist:d8ba410cee2f1dff288015d6087bde06
Created January 26, 2018 08:43
IIS url rewrite http to https
<rewrite>
<rules>
<rule name="Rewrite HTTP to HTTPS" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
</rules>