forked from altinum/stride-docs-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.config
58 lines (58 loc) · 2.88 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
<staticContent>
<clientCache cacheControlMaxAge="1.00:00:00" cacheControlMode="UseMaxAge" />
<mimeMap fileExtension=".md" mimeType="text/plain" />
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
<rewrite>
<rules>
<rule name="Redirect xenko.com to stride3d.net" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(.*)xenko\.com$" />
</conditions>
<action type="Redirect" url="https://{C:1}stride3d.net/{R:0}" redirectType="Permanent" />
</rule>
<rule name="Redirect root and 'latest' to 'latest/en/' ">
<match url="^(latest)?$" />
<action type="Redirect" url="latest/en/" redirectType="Found" />
</rule>
<rule name="Redirect 'latest/{1}' to 'latest/en/{1}' when language is missing from initial url">
<match url="^latest/(.*)" />
<conditions>
<add input="{R:1}" pattern="^(en|jp)(/|$)" negate="true" />
</conditions>
<action type="Redirect" url="latest/en/{R:1}" redirectType="Found"/>
</rule>
<!-- Rename Xenko to Stride for 4.0+ and latest -->
<rule name="Redirect uppercase Xenko to Stride for 4.0+">
<match url="(([4-9]|[1-9]\d+)\.\d*|latest)/(.*)(Xenko)(.*)" />
<action type="Redirect" redirectType="Permanent" url="{R:1}/{R:3}Stride{R:5}" />
</rule>
<rule name="Redirect lowercase xenko to stride for 4.0+">
<match url="(([4-9]|[1-9]\d+)\.\d*|latest)/(.*)(xenko)(.*)" />
<action type="Redirect" redirectType="Permanent" url="{R:1}/{R:3}stride{R:5}" />
</rule>
<!-- Update this rule when there is a new Xenko doc version released -->
<rule name="Rewrite URL for latest documentation">
<match url="latest(.*)" />
<action type="Rewrite" url="%deployment_version%/{R:1}" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Custom">
<remove statusCode="404"/>
<error statusCode="404" path="%deployment_version%\en\404.html" responseMode="File" />
</httpErrors>
</system.webServer>
</configuration>