Skip to content

Instantly share code, notes, and snippets.

@shibayan
Created December 29, 2014 13:44
Show Gist options
  • Save shibayan/9771890efd803bb9997a to your computer and use it in GitHub Desktop.
Save shibayan/9771890efd803bb9997a to your computer and use it in GitHub Desktop.
SSL を強制する URL Rewrite 設定
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment