Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <staticContent>
- <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
- </staticContent>
- <httpProtocol>
- <customHeaders>
- <clear/>
- <add name="X-UA-Compatible" value="IE=EDGE" />
- </customHeaders>
- </httpProtocol>
- <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="Permanent" url="https://{HTTP_HOST}{REQUEST_URI}" />
- </rule>
- <rule name="Angular Routes" 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>
- <outboundRules>
- <rule name="RewriteCacheControlForHTMLFiles" preCondition="FileEndsWithHtml">
- <match serverVariable="RESPONSE_Cache_Control" pattern=".*" />
- <action type="Rewrite" value="no-store, max-age=0" />
- </rule>
- <preConditions>
- <preCondition name="FileEndsWithHtml">
- <add input="{REQUEST_FILENAME}" pattern="\.html$" />
- </preCondition>
- </preConditions>
- </outboundRules>
- </rewrite>
- </system.webServer>
- </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement