Created
August 5, 2014 22:56
-
-
Save srkirkland/657566fb26e1179d73ed to your computer and use it in GitHub Desktop.
url rewrite
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
<rewrite> | |
<rules> | |
<rule name="HTTP to HTTPS redirect" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="site.ucdavis.edu" ignoreCase="true" /> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
</conditions> | |
<action type="Redirect" redirectType="Found" url="https://site.ucdavis.edu/{R:1}" /> | |
</rule> | |
<rule name="StaticContent"> | |
<action type="Rewrite" url="public{REQUEST_URI}"/> | |
</rule> | |
</rules> | |
<rewriteMaps> | |
<rewriteMap name="MapProtocol"> | |
<add key="on" value="https" /> | |
<add key="off" value="http" /> | |
</rewriteMap> | |
</rewriteMaps> | |
</rewrite> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment