title: Gatsby Dynamic Routing 404 build
body: <p>I'm building a website with Gatsby and Strapi.
  I'm using <a href="https://www.gatsbyjs.com/docs/how-to/routing/client-only-routes-and-user-authentication/" rel="nofollow noreferrer">dynamic routes</a>.</p>
  <p>With <code>gatsby develop</code>, everything fine.</p>
  <p>With <code>gatsby build</code>, <strong>links between pages are working, but typing the URLs give me 404</strong>.
  Example: I can go from <code>/</code> to <code>/room</code> with a click but when I type <code>/room</code>, I get a 404.</p>
  <p><strong>How should I fix this?</strong> Am I missing something?</p>
  <p>index.js routing part:</p>
  <pre><code>        &lt;Router basepath=&quot;/&quot;&gt;
            &lt;Doors path=&quot;/&quot; exitTransition={exitTransition}&gt;&lt;/Doors&gt;
            &lt;Room path=&quot;/room&quot; exitTransition={exitTransition}&gt;&lt;/Room&gt;
            &lt;Sound path=&quot;/sound&quot; sounds={sounds} currentSoundIndex={currentSoundIndex} setCurrentSoundIndex={setCurrentSoundIndex} audioPlayerRef={audioPlayerRef}&gt;&lt;/Sound&gt;
            &lt;Cloakroom path=&quot;/cloakroom&quot; clothes={clothes}&gt;&lt;/Cloakroom&gt;
            {clothesRoutes}
          &lt;/Router&gt;
  </code></pre>
  <p>gatsby-node.js</p>
  <pre><code>exports.onCreatePage = ({ page, actions }) =&gt; {
    const { createPage } = actions
    if (page.path === `/`) {
      page.matchPath = `/*`
      createPage(page)
    }
  }
  </code></pre>
  <p><em>Note:</em> Local http-server build is working. But on my client's hosted server it's not.
  I'm using Router from @reach/router.</p>
  <p><strong>Thank you so much for your help!</strong></p>