Skip to content

Instantly share code, notes, and snippets.

@detroitpro
Created August 12, 2016 14:20
Show Gist options
  • Save detroitpro/8e4eaa85081e90eca8bae99e8e7cd1fd to your computer and use it in GitHub Desktop.
Save detroitpro/8e4eaa85081e90eca8bae99e8e7cd1fd to your computer and use it in GitHub Desktop.
redirect azure web app to https (remove http)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- ADD YOUR RULES HERE -->
<rule name="Redirect_to_https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
<!-- ADD YOUR RULES HERE -->
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment