Skip to content

Instantly share code, notes, and snippets.

@amirilovic
Created September 25, 2014 09:29
Show Gist options
  • Select an option

  • Save amirilovic/669321b0273f78146561 to your computer and use it in GitHub Desktop.

Select an option

Save amirilovic/669321b0273f78146561 to your computer and use it in GitHub Desktop.
IIS web.config for AngularJS
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".svg"/>
<mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
</staticContent>
<rewrite>
<rules>
<rule name="AngularJS" 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.html"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment