trying to setup redirects on netlify and need this TOML file outputted from netlify
[[redirects]]
from = "/*"
to = "/dashboard"
status = 200
force = false
query = {path = ":path"} # apply this rule for /?path=example
conditions = {Role = ["admin"]}
[[redirects]]
from = "/*"
to = "/login"
status = 302
I wrote this
root.createDataFile('netlify.toml', 'toml',
dato.redirects.map(redirect => {
return {
redirects: {
to: redirect.to,
from: redirect.from,
status: redirect.stat
}
};
})
);
whichs i giving me this
[[redirects]
to = "/Blog/best-way-build-image"
from = "/Blog/want-more-repeat-business-then-dont-make-this-mistake/"
status = "301"
, [redirects]
to = "/Blog/best-way-build-image"
from = "/Blog/using-video-improve-companys-message/"
status = "301"
]
what am i doing wrong??