-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.config
60 lines (58 loc) · 3.38 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Force SSL" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<!-- <add input="{HTTP_HOST}" negate="true" pattern="^/img/favicon\.ico$" ignoreCase="true" /> -->
<!-- <add input="{HTTP_HOST}" pattern="^[^www]" /> -->
<add input="{HTTP_HOST}" pattern="^http://nexusmutual\.io$" />
<add input="{HTTPS}" pattern="off" />
<!-- <add input="{REQUEST_URI}" pattern="^/img/favicon\.ico$" ignoreCase="true" negate="true" /> -->
</conditions>
<action type="Redirect" url="https://nexusmutual.io/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="Force no WWW" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<!-- <add input="{HTTP_HOST}" negate="true" pattern="^/img/favicon\.ico$" ignoreCase="true" /> -->
<!-- <add input="{HTTP_HOST}" pattern="^[^www]" /> -->
<add input="{HTTP_HOST}" pattern="^http://www\.nexusmutual\.io$" />
<add input="{HTTPS}" pattern="off" />
<!-- <add input="{REQUEST_URI}" pattern="^/img/favicon\.ico$" ignoreCase="true" negate="true" /> -->
</conditions>
<action type="Redirect" url="https://nexusmutual.io/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="Force no WWW - 2" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<!-- <add input="{HTTP_HOST}" negate="true" pattern="^/img/favicon\.ico$" ignoreCase="true" /> -->
<!-- <add input="{HTTP_HOST}" pattern="^[^www]" /> -->
<add input="{HTTP_HOST}" pattern="^https://www\.nexusmutual\.io$" />
<add input="{HTTPS}" pattern="off" />
<!-- <add input="{REQUEST_URI}" pattern="^/img/favicon\.ico$" ignoreCase="true" negate="true" /> -->
</conditions>
<action type="Redirect" url="https://nexusmutual.io/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="Hide .html ext">
<match ignoreCase="true" url="^(.*)"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
<add input="{REQUEST_FILENAME}.html" matchType="IsFile"/>
</conditions>
<action type="Rewrite" url="{R:0}.html"/>
</rule>
<rule name="Redirecting .html ext" stopProcessing="true">
<match url="^(.*).html"/>
<conditions logicalGrouping="MatchAny">
<add input="{URL}" pattern="(.*).html"/>
</conditions>
<action type="Redirect" url="{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>