| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?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 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>
|