Created
November 26, 2015 20:32
-
-
Save eperedo/4d74ede5508e7c9cb4cd to your computer and use it in GitHub Desktop.
web config for angular apps
This file contains hidden or 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"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<clientCache cacheControlMode="UseExpires" | |
httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" /> | |
</staticContent> | |
<rewrite> | |
<rules> | |
<rule name="HTTP to HTTPS redirect" stopProcessing="true"> | |
<match url="(.*)"/> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true"/> | |
</conditions> | |
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}"/> | |
</rule> | |
<rule name="AngularJS" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="/index.html" /> | |
</rule> | |
</rules> | |
</rewrite> | |
<modules runAllManagedModulesForAllRequests="true"/> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment