Created
          September 16, 2019 02:14 
        
      - 
      
- 
        Save joe-oli/daf69ffbe763a404c927b7e3c160d5d7 to your computer and use it in GitHub Desktop. 
    IIS react web.config to redirect a not found 404 route to index.html
  
        
  
    
      This file contains hidden or 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> | |
| <defaultDocument> | |
| <files> | |
| <remove value="default.aspx" /> | |
| <remove value="iisstart.htm" /> | |
| <remove value="index.htm" /> | |
| <remove value="Default.asp" /> | |
| <remove value="Default.htm" /> | |
| </files> | |
| </defaultDocument> | |
| <staticContent> | |
| <remove fileExtension=".woff2" /> | |
| <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /> | |
| </staticContent> | |
| <httpErrors> | |
| <remove statusCode="404" subStatusCode="-1" /> | |
| <error statusCode="404" prefixLanguageFilePath="" path="/YourVirtualReactUIApp/index.html" responseMode="ExecuteURL" /> | |
| </httpErrors> | |
| </system.webServer> | |
| </configuration> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment