hi!
I’m struggling with this strange behaviour.
I setup my redirect in the _redirect file placed in the public folder:
and why not simply: https://mywebsite.netlify.app/* https://mywebsite.it/:splat 301!
and after the build Netlify sees 1 redirect.
I try to navigate in the .netlify.app website but nothing happens.
So I try with the .toml file but it doens’t work too.
I never had problem with the redirect int he nuxt3 version with static and spa generation:
With Nuxt 3 ISG redirect downs’t work for me.
If you have any advice would be appreciated because I would avoid the .netlify.app website indexes.
@DidoMarchet That’s still a good result though, since it proves that the redirect file you’re editing is in the right place and being processed by Netlify.
Due to the Rule processing order I wouldn’t expect the bottom two rules to work when accessed via the zavalight.netlify.app domain, (since they come after the less specific wildcard based rule), but I would expect them to work on zavaluce.it presuming that it is the same site.
I can’t advise why it’s not working, that’ll be up to a Netlify staff member to confirm, but my guess is that your original statement may be correct and that Netlify redirects don’t “play nice” with whatever Nuxt middleware is running.
The headers do look different on the requests, than standard Netlify requests, and contain:
@DidoMarchet, you’re using Nuxt in Edge Functions mode: Deploy details | Deploys | zavalight | Netlify. Edge Functions run before redirects, so all the requests are directly consumed by Nuxt and never hit the Netlify Redirects engine. Either switch to Netlify Functions mode or use your middleware.