My website’s (https://warm-elf-8a7243.netlify.app) redirects aren’t working, despite being set up as perfect as I can tell from the documentation, and being put into the right location when deploying.
My site is built using Vite into a dist folder, so I have a postbuild script that runs in order to copy the _redirects file from the root of my repo, into the dist folder.
Upon deploying, I can see in the build output, the message: “A “_redirects” file is present in the repository but is missing in the publish directory “dist”.”
The contents of my _redirects file is simply:
/* /dist/index.html 200
I have tried with /index.html
instead of /dist/index.html
, however that also didn’t work, and also doesn’t match the format that I’m using in another Netlify project where the redirects are working perfectly fine…
When running netlify dev
locally, the _redirects appear to work perfectly fine, as I’m able to refresh the page and get pushed to index.html appropriately…
What am I missing?