Hi,
I would like to configure a 404 page for the root directory of a multilingual website, where the different language files reside in sub directories (/en/ and /de/).
My netlify.toml contains the following redirect for a default redirect to the German language version:
[[redirects]]
from = "/"
to = "/de/"
status = 301
force = true
and there are also redirects for language specific custom 404’s in the netlify.toml:
[[redirects]]
from = "/en/*"
to = "/en/404.html"
status = 404
[[redirects]]
from = "/de/*"
to = "/de/404.html"
status = 404
The custom 404 I want to create should only show in case someone tries to call e.g. example.com/doesnt-exist.html. The custom 404 page currently resides in /404.html.
How would I configure this in netlify.toml?
Can I use some kind of if else statements in the from = "" directive?
I am a bit lost. Thank you for your help.