forked from subin01/mad-apprenticeship
-
Notifications
You must be signed in to change notification settings - Fork 1
/
web.config
57 lines (57 loc) · 3.58 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
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rewrite googlebot url to a snippet unless an asset" stopProcessing="true">
<match url="^(.+)/$" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="_escaped_fragment_" ignoreCase="false"/>
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
</conditions>
<action type="Rewrite" url="snippets/{R:1}.html"/>
</rule>
<rule name="rewrite googlebot url of a nested page to a snippet unless an asset" stopProcessing="true">
<match url="^([.a-zA-Z0-9-_/]+)$" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="_escaped_fragment_" ignoreCase="false"/>
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
</conditions>
<action type="Rewrite" url="snippets/{R:1}.html"/>
</rule>
<rule name="rewrite googlebot url of home to a snippet unless an asset" stopProcessing="true">
<match url="^" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="_escaped_fragment_" ignoreCase="false"/>
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
</conditions>
<action type="Rewrite" url="snippets/1.html"/>
</rule>
<rule name="rewrite all home requests with or without trailing slash to index.html" stopProcessing="true">
<match url="^/?$" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true"/>
</rule>
<rule name="rewrite all asset urls relative to pages to actual asset urls" stopProcessing="true">
<match url="^.+(dist|img|snippets)(/(.*))?" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<action type="Rewrite" url="{R:1}{R:2}" appendQueryString="true"/>
</rule>
<rule name="rewrite all page urls to index.html" stopProcessing="true">
<match url="^[.a-zA-Z0-9-_]+(/(.*))?" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^(dist|img|snippets)" ignoreCase="false" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>