-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
61 lines (54 loc) · 2.51 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- Prevent web access to all files in the /config/ directory -->
<security>
<requestFiltering>
<hiddenSegments>
<add segment="config"/>
</hiddenSegments>
</requestFiltering>
</security>
<!-- X3 rewrite rules -->
<rewrite>
<rules>
<!-- Rewrite any calls to *.html, *.json, *.xml, *.atom or *.rss if a folder matching * exists -->
<rule name="Rewrite any calls to *.html, *.json, *.xml, *.atom or *.rss if a folder matching * exists" stopProcessing="false">
<match url="(.+)\.(html|json|xml|atom|rss)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}/" />
</rule>
<!-- Add a trailing slash to directories -->
<rule name="Add a trailing slash to directories" stopProcessing="false">
<match url="([^/]+)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="(\.|\?)" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="(.*)/$" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}/" />
</rule>
<!-- Rewrite any calls to /render to the image parser -->
<rule name="Rewrite any calls to /render to the image parser" stopProcessing="false">
<match url="^render/." ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="render/" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="app/parsers/slir/" />
</rule>
<!-- Rewrite routes to index.php if they are non-existent files/dirs -->
<rule name="Rewrite routes to index.php if they are non-existent files/dirs" stopProcessing="false">
<match url="^(.*)/$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?/{R:1}/" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>