forked from exponentcms/exponent-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.config
78 lines (78 loc) · 4.53 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="false" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Move from subfolder to root" enabled="false" stopProcessing="true">
<match url="^testfolder/(.*)$" />
<action type="Redirect" url="/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Change to www." enabled="false" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^example\.com$" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Remove www." enabled="false" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" />
</conditions>
<action type="Redirect" url="http://example.com/{R:1}" redirectType="Permanent" />
</rule>
<rule name="Convert index.html call">
<match url="^$" ignoreCase="false" />
<action type="Rewrite" url="index.html" appendQueryString="true" />
</rule>
<rule name="Convert *.html call">
<match url="^([^.]+)$" ignoreCase="false" />
<action type="Rewrite" url="{R:1}.html" appendQueryString="true" />
</rule>
<rule name="Psuedo logmein.php" enabled="false">
<match url="^logmein.php$" ignoreCase="false" />
<action type="Rewrite" url="login/showlogin" />
</rule>
<rule name="Main SEF URL Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="\.(css|js|pdf|shtml|htc|map)$" negate="true" />
<add input="{URL}" pattern="\.(jpe?g|gif|png|tiff|svg|webp)$" negate="true" />
<add input="{URL}" pattern="\.(mp3|mp4|webm|ogv|flv|f4v|mov|mpeg)$" negate="true" />
<add input="{URL}" pattern="^/robots\.txt$" negate="true" />
<add input="{URL}" pattern="^/favicon\.ico$" negate="true" />
<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" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors>
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="403" prefixLanguageFilePath="" path="/index.php?controller=notfound&action=handle_not_authorized&error=403" responseMode="ExecuteURL" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.php?controller=notfound&action=handle&error=404" responseMode="ExecuteURL" />
<error statusCode="500" prefixLanguageFilePath="" path="/index.php?controller=notfound&action=handle_internal_error&error=500" responseMode="ExecuteURL" />
</httpErrors>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
</system.webServer>
</configuration>