This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="HTTP to HTTPS redirect" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
</conditions> | |
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" | |
redirectType="Permanent" /> | |
</rule> | |
</rules> | |
<outboundRules> | |
<rule name="Add Strict-Transport-Security when HTTPS" enabled="true"> | |
<match serverVariable="RESPONSE_Strict_Transport_Security" | |
pattern=".*" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="on" ignoreCase="true" /> | |
</conditions> | |
<action type="Rewrite" value="max-age=31536000" /> | |
</rule> | |
</outboundRules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Comments
Post a Comment