title: Load index.html for every possible route of my React SPA that is hosted on digitalocean spaces
body: <p>I use digital ocean space and CDN to host a React SPA. When hitting with a browser the url <code>[host]/index.html</code> it works fine. However hitting <code>[host]/index.html/customers/one</code> or any other subpaths, returns a 404. Currently, any reload on any subpath returns that 404. Last, I use terraform to update the SPA artifacts on DO spaces and I have tried to add a <code>website_redirect=&quot;/index.html&quot;</code> to all the bucket objects (js, html and css) but with no success (more info if necessary <a href="https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/spaces_bucket_object#website_redirect" rel="nofollow noreferrer">here</a>). And to be completely honest I am not sure I understand that option in the terraform digitalocean provider. I might be using it completely wrong.</p>
  <p>Now, I have seen that question in multiple places but never with a clear answer.</p>
  <ul>
  <li>Here is one on digitalocean community (<a href="https://www.digitalocean.com/community/questions/is-it-possible-to-send-a-301-redirect-for-bucket-objects" rel="nofollow noreferrer">https://www.digitalocean.com/community/questions/is-it-possible-to-send-a-301-redirect-for-bucket-objects</a>) where no answer is provided but the issue seems to be similar.</li>
  <li>There is a similar question on SO without an approved answer <a href="https://stackoverflow.com/questions/58726289/redirect-wrong-url-path-digitalocean-spaces">Redirect wrong URL/path DigitalOcean Spaces</a></li>
  <li>This is a DO idea that is somewhat related <a href="https://ideas.digitalocean.com/ideas/DO-I-318" rel="nofollow noreferrer">https://ideas.digitalocean.com/ideas/DO-I-318</a></li>
  </ul>
  <p>Is there a way to achieve the mentioned goal of loading index.html for every route with DO space + CDN and let the app parse the rest of the path to display the right component subtree of the react app?</p>