Hi, I have a problem with redirects using Netlify Dev.
I’m trying to redirect a local path (e.g /foo) to an external url (e.g https://netlify.com) with Netlify Dev. In my _redirects I’d like to have this simple entry: /foo https://netlify.com. From the doc the default status code should be 301. When I deploy , all works, but on my host using Netlify Dev, the redirects to path other than the local ones are redirected to the home page. The only way I found to have the redirects to external domains working, is to force a 200! status code: /foo https://netlify.com 200!, but it’s not the semantic I’d like. Moreover, only in this last scenario I’ve the following logs from Netlify Dev
◈ Reloading redirect rules from [ '_redirects', 'netlify.toml' ]
Regenerating: 1 file(s) changed at 2021-11-29 16:51:22
_redirects
Jekyll Feed: Generating feed for posts
...done in 0.058692 seconds.
◈ Proxying to https://netlify.com/
[HPM] Proxy created: / -> https://netlify.com
Hi! Yes, this is one of my attempts: Mattia / ProvaJekyllNetlifyCLI · GitLab. I installed the Netlify CLI when I wrote the post, few days ago. Now I’m not at my pc at work, so I’m not sure about the exact node version. If you think it could matter I’ll let you know tomorrow
Can you share me the repo that’s ok for you so I can test on my machine please?
First of all thank you for your time trying my website. _redirects to the same website works well for me too. The one that point to an external domain (in my example /foo https://netlify.com) doesn’t work to me unless I write 200!. I don’t know why it crashes the server any idea? Do you think I did something wrong?