Skip to content

Instantly share code, notes, and snippets.

@jgatjens
Created May 3, 2017 18:30
Show Gist options
  • Save jgatjens/f1fc56d4decece3dce024b47fdabcc3d to your computer and use it in GitHub Desktop.
Save jgatjens/f1fc56d4decece3dce024b47fdabcc3d to your computer and use it in GitHub Desktop.
.Net config for SPA's
<?xml version="1.0" encoding="UTF-8"?>
<!-- Environment: Stage -->
<configuration>
<connectionStrings>
</connectionStrings>
<appSettings>
</appSettings>
<system.web>
<compilation debug="false" targetFramework="4.0"/>
</system.web>
<system.webServer>
<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" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment