-
Notifications
You must be signed in to change notification settings - Fork 1
/
web.config
55 lines (49 loc) · 2.6 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to index.php | Example for any framework like codeigniter">
<match url="index.php|robots.txt|images|test.php" />
<action type="None" />
</rule>
<rule name="Rewrite CI Index">
<match url=".*" />
<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:0}" />
</rule>
<rule name="Rewrite Gzip CSS">
<match url=".*\.css$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="false" />
</conditions>
<action type="Rewrite" url="gzip.php?type=css&file={R:0}" />
</rule>
<rule name="Rewrite Gzip JS">
<match url=".*\.js$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="false" />
</conditions>
<action type="Rewrite" url="gzip.php?type=js&file={R:0}" />
</rule>
<rule name="Rewrite Gzip PNG">
<match url=".*\.png$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="false" />
</conditions>
<action type="Rewrite" url="gzip.php?type=png&file={R:0}" />
</rule>
<rule name="Rewrite Gzip JPG">
<match url=".*\.jpg" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="false" />
</conditions>
<action type="Rewrite" url="gzip.php?type=jpg&file={R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>