-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
113 lines (113 loc) · 4.94 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="index.html" />
</files>
</defaultDocument>
<staticContent>
<remove fileExtension=".svg"/>
<remove fileExtension=".ico" />
<remove fileExtension=".css" />
<remove fileExtension=".js" />
<remove fileExtension=".html" />
<remove fileExtension=".xml" />
<remove fileExtension=".woff2" />
<remove fileExtension=".woff" />
<remove fileExtension=".txt" />
<mimeMap fileExtension=".txt" mimeType="text/plain;charset=utf-8" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<mimeMap fileExtension=".xml" mimeType="application/atom+xml;charset=utf-8" />
<mimeMap fileExtension=".html" mimeType="text/html;charset=utf-8" />
<mimeMap fileExtension=".js" mimeType="application/javascript;charset=utf-8" />
<mimeMap fileExtension=".css" mimeType="text/css;charset=utf-8" />
<mimeMap fileExtension=".ico" mimeType="image/x-icon" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" cacheControlCustom="public" />
</staticContent>
<httpErrors>
<remove statusCode="404" />
<error statusCode="404" path="404.html" responseMode="File" />
</httpErrors>
<rewrite>
<rules>
<rule name="Ignore .well-known" stopProcessing="true">
<match url="^.well-known/" ignoreCase="true" />
<action type="None" />
</rule>
<rule name="Remove WWW prefix">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^www\.adrianba\.net" />
</conditions>
<action type="Redirect" url="https://adrianba.net/{R:1}" redirectType="Permanent" />
</rule>
<rule name="HTTP to HTTPS redirect">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Rewrite RSS">
<match url="^(feed|Atom\.aspx|rss\.aspx|rss/rss\.aspx)$" ignoreCase="true" />
<action type="Redirect" url="/feed.xml" redirectType="Permanent" />
</rule>
<rule name="Rewrite Default">
<match url="default.aspx?" ignoreCase="true" />
<action type="Redirect" url="/" redirectType="Permanent" />
</rule>
<rule name="Allow .html for archive days" stopProcessing="true">
<match url="(\d+)/(\d+)/(\d+)\.html" ignoreCase="true" />
<action type="None" />
</rule>
<rule name="Allow .html for downloads" stopProcessing="true">
<match url="software/download/.*(\.htm|\.html)" ignoreCase="true" />
<action type="None" />
</rule>
<rule name="Allow archive blog- for Wayback Machine lookup" stopProcessing="true">
<match url="^archive/blog-(.*)\.aspx$" ignoreCase="true" />
<action type="None" />
</rule>
<rule name="Rewrite Archive">
<match url="archive/(\d+)/(\d+)/(.+).aspx" ignoreCase="true" />
<action type="Redirect" url="/{R:1}/{R:2}/{R:3}/" redirectType="Permanent" />
</rule>
<rule name="Rewrite Archive Folder">
<match url="archive/(\d+)/(\d+).aspx" ignoreCase="true" />
<action type="Redirect" url="/{R:1}/{R:2}/" redirectType="Permanent" />
</rule>
<rule name="Rewrite pages">
<match url="pages/(.*)" ignoreCase="true" />
<action type="Redirect" url="/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Rewrite extensions">
<match url="(.*)(\.htm|\.html|\.aspx)" ignoreCase="true" />
<action type="Redirect" url="/{R:1}/" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<httpProtocol>
<customHeaders>
<clear />
<add name="Strict-Transport-Security" value="max-age=10886400; includeSubDomains" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="Referrer-Policy" value="no-referrer-when-downgrade" />
</customHeaders>
</httpProtocol>
</system.webServer>
<location path="index.html">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1:00:00" cacheControlCustom="public" />
</staticContent>
</system.webServer>
</location>
</configuration>