Skip to content

Instantly share code, notes, and snippets.

@rajguru827
Created November 22, 2018 06:05
Show Gist options
  • Save rajguru827/d72d01807618dc380b4ce0e1ac0e3f66 to your computer and use it in GitHub Desktop.
Save rajguru827/d72d01807618dc380b4ce0e1ac0e3f66 to your computer and use it in GitHub Desktop.
IIS Config for Angular
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" 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="./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