title: Azure App service not working with custom routing in React-Redux web app - need wildcard virtual directories?
body: <p>I have custom routes like follows:</p>
  
  <pre><code>// @flow
  
  import React, { PureComponent } from 'react';
  import { Switch, Redirect } from 'react-router-dom';
  import { withRouter } from 'react-router';
  
  import { Route } from 'components/Routes';
  import Story from 'pages/Story';
  import Page404 from 'pages/404';
  
  class Routes extends PureComponent&lt;{}&gt; {
    render() {
      return (
        &lt;Switch&gt;
          &lt;Route exact path="/" render={props =&gt; &lt;Story {...props} /&gt;} /&gt;
          &lt;Route
            exact
            path="/chapter/:id"
            render={props =&gt; &lt;Story {...props} /&gt;}
          /&gt;
          &lt;Route path="/404" render={props =&gt; &lt;Page404 {...props} /&gt;} /&gt;
          &lt;Redirect to="/404" /* Must be the last one */ /&gt;
        &lt;/Switch&gt;
      );
    }
  }
  
  export default withRouter(Routes);
  </code></pre>
  
  <p>This works fine in localhost, if I visit localhost:3000/chapter/3 the web app redirects successfully, unfortunately in live builds running on azure app services if I visit: mysite.azurewebsites.net/chapter/3 I'm given an error:</p>
  
  <blockquote>
    <p>The resource you are looking for has been removed, had its name
    changed, or is temporarily unavailable.</p>
  </blockquote>
  
  <p>I'm running a Windows based App Service plan. I'm sure there's some option to set up redirecting, i.e. /chapter/* -> /www_siteroot/ but I haven't been able to figure out how to do it.</p>
  
  <p>I fixed the issue by going to the app service settings and adding /chapter/1, /chapter/2, etc, etc under 'Virtual applications and directories' and directing them to site\wwwroot.</p>
  
  <p>I'd prefer to have a wildcard option like /chapter/* but it doesn't seem to work and I get an error.</p>