Skip to content

Instantly share code, notes, and snippets.

@Lahirutech
Created June 8, 2021 18:39
Show Gist options
  • Save Lahirutech/f86cfab6eb20353426578823baf18ec0 to your computer and use it in GitHub Desktop.
Save Lahirutech/f86cfab6eb20353426578823baf18ec0 to your computer and use it in GitHub Desktop.
Web config File
<?xml version="1.0"?>
<configuration>
<system.webServer>
<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>
@FacuKopech
Copy link

what do you punt here?
input="{REQUEST_FILENAME}"

@FacuKopech
Copy link

and here
input="{REQUEST_URI}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment