Redirect failing - netlify.toml

The following in netlify.toml isn’t working:

[[redirects]]
  from = "/path/from"
  to = "/path/to"
  status = 301

I am getting, instead, a 404 page whose path ends in a concatenation: /path/from/path/to

What am I doing wrongly?

If it’s that dumb a question, that’s OK. But please let me know.

Well, disregard. I rebuilt from a different repo and it worked. Same exact netlify.toml file, so I’m at a loss to know what happened, but at least it works now.

The way I did it is by creating a _headers file, filled in my headers of course, and then copy/paste it to play.netlify.com. If the result of the headers is successful I copy/paste the outcome to my netlify.toml file.

So I have both the _headers and netlify.toml file in my project.

2 Likes

Very interesting. Thanks.