Skip to content

Instantly share code, notes, and snippets.

@rahulmr
Forked from t-palmer/web.config
Created November 25, 2021 08:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmr/ea22815358c0d256af3ac8b08d5cc0aa to your computer and use it in GitHub Desktop.
Save rahulmr/ea22815358c0d256af3ac8b08d5cc0aa to your computer and use it in GitHub Desktop.
Example IIS web.config file for Angular Router applications
<?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" />
</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