Skip to content

Instantly share code, notes, and snippets.

@anderfernandes
Created May 10, 2017 21:47
Show Gist options
  • Save anderfernandes/40f690c1afc31256e30633dd5d977c2e to your computer and use it in GitHub Desktop.
Save anderfernandes/40f690c1afc31256e30633dd5d977c2e to your computer and use it in GitHub Desktop.
Mura CMS IIS 7 Configuration with multiple sites and site name in url
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="BonCode-Tomcat-CFM-Handler" />
<remove name="BonCode-Tomcat-CFC-Handler" />
<add name="BonCode-Tomcat-CFM-Handler" path="*.cfm" verb="*" type="BonCodeIIS.BonCodeCallHandler" modules="ManagedPipelineHandler" resourceType="File" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" />
<add name="BonCode-Tomcat-CFC-Handler" path="*.cfc" verb="*" type="BonCodeIIS.BonCodeCallHandler" modules="ManagedPipelineHandler" resourceType="File" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" />
</handlers>
<defaultDocument>
<files>
<add value="index.cfm" />
</files>
</defaultDocument>
<rewrite>
<rules>
<!--
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="true">
<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>
</rules>
</rewrite>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
</staticContent>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment