Created
May 9, 2018 03:02
-
-
Save gleox/b8890b66915b1ba6e9757e7f316444b2 to your computer and use it in GitHub Desktop.
A IIS rewrite rule for SPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="pages" enabled="true" stopProcessing="true"> | |
<match url="(.*)" /> | |
<action type="Rewrite" url="/" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_URI}" matchType="Pattern" pattern="/(api|static)(.*)$" ignoreCase="true" negate="true" /> | |
</conditions> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> | |
<!-- https://gingter.org/2017/03/20/deep-link-angular-spa-iis/ --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment