title: React Router throwing 404 on Azure Linux Web App
body: <p>We are migrating our React Web App to a Linux App Service from a Windows App Service. We had a custom web.config that would handle routing so that when a user manually visits one of our routes, they would not run into a 404. This fix is not working on a Linux App Service.</p>
  
  <p>We're running into 404's and we need this to work as we have custom routes that the user should be able to reach. The site works if they route to the default index.html, but custom routes don't. We've tried creating a new Windows App Service and the migration works just fine. Any ideas on how to get custom routes working in a Linux App Service?</p>
  
  <p>Here's our web.config we are currently using:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
   &lt;system.webServer&gt;
   &lt;staticContent&gt;
   &lt;remove fileExtension=".woff" /&gt;
   &lt;remove fileExtension=".woff2" /&gt;
   &lt;remove fileExtension=".otf" /&gt;
   &lt;remove fileExtension=".ttf" /&gt;
   &lt;remove fileExtension=".eot" /&gt;
   &lt;mimeMap fileExtension=".woff" mimeType="application/font-woff" /&gt;
   &lt;mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /&gt;
   &lt;mimeMap fileExtension=".otf" mimeType="application/font-otf" /&gt;
   &lt;mimeMap fileExtension=".ttf" mimeType="application/font-ttf" /&gt;
   &lt;mimeMap fileExtension=".eot" mimeType="application/font-eot" /&gt;
   &lt;clientCache cacheControlMode="DisableCache" /&gt;
   &lt;/staticContent&gt;
   &lt;rewrite&gt;
   &lt;rules&gt;
   &lt;rule name="React Routes" stopProcessing="true"&gt;
   &lt;match url=".*" /&gt;
   &lt;conditions logicalGrouping="MatchAll"&gt;
   &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
   &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
   &lt;add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /&gt;
   &lt;/conditions&gt;
   &lt;action type="Rewrite" url="/" /&gt;
   &lt;/rule&gt;
   &lt;/rules&gt;
   &lt;/rewrite&gt;
   &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>