Redirect from netlify not working (404 not found) with Nuxt Content in SSG
I migrated a blog to Nuxt 3 (with Nuxt Content) and have some content whose URL has changed : for instance /gitcheatsheet to /goodies/gitcheatsheet
My site is hosted on Netlify, I use static site generation, so I wanted to let Netlify handle the redirection using the configuration or a redirects file. However it does not seem to be working, it is displaying a 404 not found page instead.
My guess is that it's because Nuxt is handling the routing and redirecting to the 404 page. See the code below
Here is my netlify.toml file content :
I have also tried with a _redirects file containing
/gitcheatsheet /goodies/gitcheatsheet
Does anyone has a cue on how I can make the redirection work?2 Replies
The error message I have is "404 error " : Page not found: /gitcheatsheet
It's weird because when using netlify dev it works correctly
Using _redirects file does not seem to work either
However routerules (https://nitro.unjs.io/config#routerules) seems to manage the redirect ok. That's weird....