Skip to content

Instantly share code, notes, and snippets.

@Rudzix77
Created September 27, 2018 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rudzix77/7e9c4e6cd524cbfa304adaf07e9aa132 to your computer and use it in GitHub Desktop.
Save Rudzix77/7e9c4e6cd524cbfa304adaf07e9aa132 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<configuration>
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="index.html" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="React 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="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment