-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
50 lines (50 loc) · 1.91 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<!--<add name="X-UA-Compatible" value="IE=edge" />-->
</customHeaders>
</httpProtocol>
<!-- Optional static content caching
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>-->
<rewrite>
<rules>
<!-- Optional canonical url rule
<rule name="CanonicalHostNameRule1">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^mydomain\.com$" negate="true" />
</conditions>
<action type="Redirect" url="http://mydomain.com/{R:1}" />
</rule>-->
<rule name="LowerCaseUrls" stopProcessing="true">
<match url="[A-Z]" ignoreCase="false" />
<action type="Redirect" url="{ToLower:{URL}}" />
</rule>
<rule name="RemoveTrailingSlash" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="RemoveHTMLExtensions" stopProcessing="true">
<match url="^(.*)\.html$" />
<action type="Redirect" url="{R:1}" appendQueryString="true" />
</rule>
<rule name="RewriteHTMLExtensions" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="{R:1}.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>