# Mautic IIS web.config

**URL:** <https://forum.mautic.org/t/mautic-iis-web-config/6786>\
**Category:** General Discussion\
**Created:** [December 7, 2016, 11:18pm UTC](https://forum.mautic.org/t/mautic-iis-web-config/6786 "2016-12-07T23:18:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cm90](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@cm90](https://forum.mautic.org/u/cm90)\
**Post date:** [December 7, 2016, 11:18pm UTC](https://forum.mautic.org/t/mautic-iis-web-config/6786/1 "2016-12-07T23:18:11Z")

</div>

Hi All,  
  
  
  
I have seen a few questions in relation to setting up web.config to re write Mautic URL’s but no working solution. Please see the below example which is working nicely on my installation…

Code:

\<?xml version="1.0" encoding="utf-8" ?\> 

  
Thanks

---

<div class="post-metadata">

**Author:** ![cm90](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@cm90](https://forum.mautic.org/u/cm90)\
**Post date:** [December 7, 2016, 11:18pm UTC](https://forum.mautic.org/t/mautic-iis-web-config/6786/2 "2016-12-07T23:18:11Z")

</div>

Hi All,

I have seen a few questions in relation to setting up web.config to re write Mautic URL’s but no working solution. Please see the below example which is working nicely on my installation…

```auto
<?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="Main Rule" stopProcessing="true">
	  <match url=".*"/>
	  <conditions logicalGrouping="MatchAll">
	  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
	  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
	  </conditions>
	  <action type="Rewrite" url="index.php"/>
	  </rule>
			<rule name="Second Rule" 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>
</rewrite>
</configuration>
```

Thanks
