scott
November 29, 2017, 4:06am
1
I saw this post https://www.mautic.org/community/index.php/2667-installing-mautic-on-azure-websites/0 and it did not work for me as going to mysite.com still did not forward. What my final web.config looks like is
Code:
<?xml version="1.0" encoding="utf-8"?>
I started this from a conversation on Experts Exchange https://www.experts-exchange.com/questions/29070741/Configure-web-config-for-Mautic-on-IIS-to-mimic-htaccess.html#a42385211
scott
November 29, 2017, 4:06am
2
I saw this post https://www.mautic.org/community/index.php/2667-installing-mautic-on-azure-websites/0 and it did not work for me as going to mysite.com still did not forward. What my final web.config looks like is
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
<rewrite>
<rules>
<rule name="Rewrite to index.php">
<match url="^([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)$" />
<conditions>
<add input="{URL}" negate="true" pattern="index.php(.*)" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}/{R:2}" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="/" defaultValue="/s/dashboard" />
</rewriteMaps>
</rewrite>
</system.webServer>
</configuration>
I started this from a conversation on Experts Exchange https://www.experts-exchange.com/questions/29070741/Configure-web-config-for-Mautic-on-IIS-to-mimic-htaccess.html#a42385211
scott
November 29, 2017, 6:29am
3
As it turns out, that one does not work completely. This one does the trick.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
<rewrite>
<rules>
<rule name="mautic" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="/" defaultValue="/s/dashboard" />
</rewriteMaps>
</rewrite>
</system.webServer>
</configuration>