forked from RadoslavGatev/Ghost-Azure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
68 lines (61 loc) · 2.36 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
<configuration>
<system.webServer>
<httpErrors existingResponse="PassThrough" />
<handlers>
<add name="iisnode" path="entry.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="LetsEncrypt" stopProcessing="true">
<match url="\.well-known\/acme-challenge\/(.*)" />
<action type="None" />
</rule>
<rule name="Redirect to non-www" stopProcessing="true">
<match url="(.*)"></match>
<conditions>
<add input="{HTTP_HOST}" pattern="^oncodedesign\.com$" negate="true"></add>
</conditions>
<action type="Redirect" url="https://oncodedesign.com/{R:1}"></action>
</rule>
<rule name="Redirect Wordpress posts" stopProcessing="true">
<match url="\d{4}\/\d{2}\/\d{2}\/(.*)$"></match>
<action type="Redirect" url="{R:1}"></action>
</rule>
<rule name="Redirect Wordpress training pages" stopProcessing="true">
<match url="training\/(.*)-training"></match>
<action type="Redirect" url="training-{R:1}"></action>
</rule>
<rule name="Redirect Wordpress training pages 2nd rule" stopProcessing="true">
<match url="training\/([\w-]+)"></match>
<action type="Redirect" url="training-{R:1}"></action>
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="content/files{REQUEST_URI}" />
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="entry.js" />
</rule>
</rules>
<outboundRules>
<rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
<match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />
<conditions>
<add input="{HTTPS}" pattern="on" ignoreCase="true" />
</conditions>
<action type="Rewrite" value="max-age=31536000" />
</rule>
</outboundRules>
</rewrite>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering removeServerHeader="true" />
</security>
</system.webServer>
</configuration>