forked from toptal/webdevchecklist.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Web.config
79 lines (66 loc) · 2.76 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
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" enableVersionHeader="false" requestPathInvalidCharacters="" />
<customErrors mode="RemoteOnly" defaultRedirect="~/" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="/" />
</customErrors>
</system.web>
<system.webServer>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="false"/>
<modules runAllManagedModulesForAllRequests="true">
<add name="WhitespaceModule" type="WhitespaceModule"/>
</modules>
<defaultDocument enabled="true">
<files>
<add value="index.cshtml" />
</files>
</defaultDocument>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365:00:00" />
<remove fileExtension=".js"/>
<mimeMap fileExtension=".js" mimeType="text/javascript" />
</staticContent>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
<rewrite>
<rules>
<rule name="Dangerous URL" stopProcessing="false">
<match url="(<)+" ignoreCase="true" />
<action type="Redirect" url="/" />
</rule>
<rule name="fingerprint" stopProcessing="true">
<match url="([\S]+)(/v-[0-9]+/)([\S]+)" />
<action type="Rewrite" url="{R:1}/{R:3}" />
</rule>
<rule name="Remove WWW" stopProcessing="false">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
</conditions>
<action type="Redirect" url="http://webdevchecklist.com{PATH_INFO}" redirectType="Permanent" />
</rule>
<rule name="Map to specific site" stopProcessing="false">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAny">
<!--<add input="{HTTP_HOST}" pattern="^localhost" negate="true" />-->
<add input="{PATH_INFO}" pattern="\." negate="true" />
<add input="{PATH_INFO}" pattern="asp\.net" />
</conditions>
<action type="Rewrite" url="/?site={HTTP_HOST}{PATH_INFO}" />
</rule>
<rule name="devchecklist" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^devchecklist.com$" />
</conditions>
<action type="Redirect" url="http://webdevchecklist.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>