"index.html" included in all SPA URLs


I’m having some issues where all URLs for my site include “index.html”.

My site: https://woodwork-bike-park.netlify.app/
Currently deployed manually with drag/drop.
Repo is at: GitHub - vpomerleau/bike-park-client

E.g., Woodwork Bike Park

I’ve added a _redirects file in my builds folder with one line:
/* /index.html 200

From the examples in the support guides, I was expecting cleaner URLs.

I would appreciate any help in figuring out where I’ve gone wrong!



Hi @vpomerleau

Looking at the main.[hash].js of the deployed site I see there is a basename set to /index.html.

r.createRoot(document.getElementById("root")).render((0, iu.jsx)(e.StrictMode, {
  children: (0, iu.jsx)(ae, {
    basename: "/index.html",
    children: (0, iu.jsx)(au, {
      children: (0, iu.jsx)(Cb, {})

As React is far from my favourite framework, I can’t say if the is definitely the cause, nor am I able to provide a solution, but hopefully this gives you something to work with.

Edit: Interesting to note, when I built this locally, the above basename isn’t present in the main JS file.

1 Like

Oh my, yes, that’s exactly it. :see_no_evil:

Thanks very much, @coelmay!