-
Notifications
You must be signed in to change notification settings - Fork 3
/
web.config
99 lines (99 loc) · 5.92 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.webServer>
<httpCompression>
<staticTypes>
<remove mimeType="*/*" />
<add mimeType="image/svg+xml" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>
<rewrite>
<rules>
<clear />
<rule name="apiredirect" enabled="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^apidocs.loginradius.com$" />
<add input="{HTTP_HOST}" pattern="^docs.loginradius.com$" negate="true" />
<add input="{HTTP_HOST}" pattern="^apidocs-dev.lr-dev.dev$" negate="true" />
<add input="{HTTP_HOST}" pattern="^apidocs-staging.div4.dev$" negate="true" />
</conditions>
<action type="Redirect" url="https://docs.loginradius.com/api/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="supportredirect" enabled="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^support.loginradius.com$" />
</conditions>
<action type="Redirect" url="https://docs.loginradius.com/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Remove docs from query String">
<match url="(.*)php(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="apidocs-dev.lr-dev.dev" />
<add input="{QUERY_STRING}" pattern="document=%2Fdocs(.*)" />
</conditions>
<action type="Rewrite" url="{R:1}php?document={C:1}" appendQueryString="false" />
</rule>
<rule name="Rewrite url with docs subdir" enabled="true" stopProcessing="true">
<match url="docs/(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="/docs/(.*)$" ignoreCase="false" />
<add input="{HTTP_HOST}" pattern="apidocs-dev.lr-dev.dev" />
</conditions>
<action type="Rewrite" url="/index.php?document={R:1}" appendQueryString="true" />
</rule>
<rule name="Redirect Rule with not virtual dir" enabled="true" stopProcessing="true">
<match url="^docs/(.*)$" negate="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="apidocs-dev.lr-dev.dev" />
<add input="{URL}" pattern="\.js" negate="true" />
<add input="{URL}" pattern="\.css" negate="true" />
<add input="{URL}" pattern="\.svg" negate="true" />
<add input="{URL}" pattern="\.ttf" negate="true" />
<add input="{URL}" pattern="\.ico" negate="true" />
<add input="{URL}" pattern="\.png" negate="true" />
<add input="{URL}" pattern="\.woff" negate="true" />
<add input="{URL}" pattern="\.php" negate="true" />
<add input="{URL}" pattern="\.gif" negate="true" />
<add input="{URL}" pattern="\.json" negate="true" />
</conditions>
<action type="Redirect" url="/docs{PATH_INFO}" />
</rule>
<rule name="CheckPath" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="apidocs-dev.lr-dev.dev" />
<add input="{URL}" pattern="/docs/(.*)" negate="true" />
<add input="{URL}" pattern="/docs/(.*)\.js" />
</conditions>
<action type="Redirect" url="/{C:1}.js" />
</rule>
<rule name="Rewrite Production Rule" enabled="true" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
<add input="{HTTP_HOST}" pattern="apidocs-dev.lr-dev.dev" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php?document={R:1}" appendQueryString="true" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="/" />
</rewriteMaps>
</rewrite>
</system.webServer>
</configuration>