Netlify.toml redirect deployed but not working?

I am trying to redirect to via a netlify.toml file.

This is my netlify.toml file:

from = “/web/f1-prediction-game-2021”
to = “/f1-prediction-game-2021”
status = 301
force = true
query = {path = “:path”}

When deploying on Netlify, it says:

1 redirect rule processed
All redirect rules deployed without errors.

I already have:

force = true

which seems to be the issue for a lot of other topics I have seen.

Any help appreciated!

@Troas Welcome to the Netlify community.

Have you tried something like this?

  from = "/web/f1-prediction-game-2021/*"
  to = "/f1-prediction-game-2021/:splat"
  status = 301
1 Like

@gregraven Thank you very much for the welcome and the solution! The redirect is working now.

Please could you explain why your redirect worked where mine didn’t?

My understanding is that even though you do not show the index.html portion of your URL, it is still there, and must be accounted for in the redirect.

1 Like