forked from armchairdeity/MuraCMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config.txt
109 lines (96 loc) · 3.63 KB
/
web.config.txt
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
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8"?>
<!-- REQUIREMENTS:
- IIS 7 or greater
- Removing 'index.cfm' requires IIS URL Rewrite Module 2.0 (http://www.iis.net/download/URLRewrite)
-->
<!-- AVAILABLE OPTIONS:
Rule 1: index.cfm and siteid in URL disabled
Rule 2: index.cfm in URL disabled
SEO Rules: allow for separate sitemap and robots files per site
-->
<!-- USAGE:
- Rename this document to "web.config" (without the quotation marks)
or copy the <rewrite><rules> section below into your working web.config
- Enable the rewrite options below by changing the enabled value to "true"
- Edit /config/settings.ini.cfm as noted in the comments before each rule
- Reload Mura CMS
-->
<configuration>
<system.webServer>
<rewrite>
<rules>
<!--
Rule 1: URLs without SiteID or index.cfm
Usage:
- set enabled="true" below
- set Mura CMS Rule 2 to enabled="false"
- set these values in /config/settings.ini.cfm:
siteidinurls=0
indexfileinurls=0
- reload Mura CMS
-->
<rule name="Mura CMS Rule 1: siteid and index.cfm" enabled="true">
<match url="^(.*)" ignoreCase="true" />
<conditions>
<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.cfm/{R:1}" appendQueryString="true" />
</rule>
<!--
Rule 2: URLs without index.cfm
Usage:
- set enabled="true" below
- set Mura CMS Rule 1 to enabled="false"
- set these values in /config/settings.ini.cfm:
siteidinurls=1
indexfileinurls=0
- reload Mura CMS
-->
<rule name="Mura CMS Rule 2: index.cfm" enabled="false">
<match url="^([a-zA-Z0-9_\-]{1,})/(.*)" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{QUERY_STRING}" pattern="(hash)" negate="true" />
</conditions>
<action type="Rewrite" url="/{R:1}/index.cfm/{R:2}" appendQueryString="true" />
</rule>
<!--
SEO Rules: individual sitemap.xml and/or robots.txt for each site
Recommended for use with Meld Google Sitemaps Plugin
Usage:
- set enabled="true" below
- duplicate and rename rules for each site
- replace www.domain.com and /siteID/ in each rule
-->
<rule name="Mura CMS SEO: Sitemap" stopProcessing="true" enabled="false">
<match url="^sitemap.xml$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www.domain.com$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/siteID/sitemap.xml" />
</rule>
<rule name="Mura CMS SEO: Robots" stopProcessing="true" enabled="false">
<match url="^robots.txt$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www.domain.com$" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="/siteID/robots.txt" />
</rule>
</rules>
</rewrite>
<defaultDocument>
<files>
<remove value="index.cfm" />
<add value="index.cfm" />
</files>
</defaultDocument>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
</system.webServer>
</configuration>