I’m having trouble setting up any redirects using netlify.toml or _redirects.
Currently, my netlify.toml configuration looks like this:
[[redirects]]
from = "/oferta"
to = "/new-path"
status = 301
force = false
query = {path = ":path"}
conditions = {Language = ["en"], Country = ["US"], Role = ["admin"]}
However, the redirection from “jakas-domena.pl/oferta” to “jakas-domena.pl/new-path” isn’t working. The file is visible in the Netlify build files.
My current file structure in the project before the build, in the development state, looks like this:
node_modules
src
static
.env
.gitignore
gatsby-browser.js
gatsby-config.js
gatsby-node.js
netlify.toml <- netlify file is here
package-lock.json
package.json
README.md
Please help me because I know how to do redirects from this level, and adding caching like _headers is essential for optimizing and working with the project.