This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Web.config
92 lines (91 loc) · 5.01 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
<?xml version="1.0" encoding="utf-8"?>
<!--
This configuration file is required if iisnode is used to run node processes behind
IIS or IIS Express. For more information, visit:
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".m4v" mimeType="video/m4v" />
<mimeMap fileExtension=".ogg" mimeType="video/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".spx" mimeType="audio/ogg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
<mimeMap fileExtension=".woff2" mimeType="font/x-woff" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<clientCache setEtag="true" cacheControlMode="UseMaxAge" cacheControlMaxAge="01:00:00" cacheControlCustom="public" />
</staticContent>
<rewrite>
<rules>
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="https" negate="true" />
<add input="{HTTP_HOST}" pattern="tparnellblognew.azurewebsites.net" negate="true" />
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
<add input="{REMOTE_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<!--<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="Domain redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="(blog)\.(tommyparnell|tparnell)" />
</conditions>
<action type="Redirect" url="https://blog.terribledev.io/{R:0}" />
</rule>
<rule name="SpecificRewrite" stopProcessing="true">
<match url="^rss$" />
<action type="Rewrite" url="public/rss.xml" />
</rule>
<rule name="Add trailing slash" stopProcessing="true">
<match url="^(.*[^/])$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<!--<add input="public{REQUEST_URI}" matchType="IsDirectory" negate="true" /><add input="public{REQUEST_URI}" matchType="IsFile" negate="true" />-->
<add input="{REQUEST_FILENAME}" pattern="(.*?)\.[a-zA-z1-9]+$" negate="true" />
<add input="{HTTP_HOST}" pattern="^.+$" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:0}/" />
</rule>
<rule name="redirectTag" stopProcessing="true">
<match url="^(tags/)(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^.+$" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/tag/{R:2}" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" />
<error statusCode="404" responseMode="Redirect" path="/404/" />
<remove statusCode="500" />
<error statusCode="500" responseMode="File" path="public/500/index.html" />
</httpErrors>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<add name="X-Powered-By" value="Fortran" />
</customHeaders>
</httpProtocol>
</system.webServer>
<system.web>
<customErrors mode="RemoteOnly">
</customErrors>
</system.web>
</configuration>