I currently have my redirects stored in a “_redirects” file within site/static, which is copied over to dist/ when built. On my production site, redirects work as expected, however when serving locally through netlify dev they don’t seem to be used at all, even though the _redirects file is appearing in dist/. What can I do to ensure redirects work in both environments?
Hi @vdadfar is the
_redirects file before the server starts running? is it copied over properly?
Hi @futuregerald, yes it is copied over properly and appears around the same time the html pages are generated
Not sure but could you try manually copying the _redirects file to your dist/ folder before your build command? Something like
cp _redirects dist/ && npm run build. See if that helps.