Hi, @emTr0. I think the redirects are almost currently working but two of the redirects work “too literally”.
Here is an example of the “empty path” URL (“empty path” meaning "nothing after the domain name except “/”):
Here is an example with curl
:
$ curl -svo /dev/null https://emtr0-dev.netlify.app/ 2>&1 | egrep "< (HTTP|location:)"
< HTTP/2 301
< location: https://emtr0.dev/:splat
It is redirecting to https://emtr0.dev/:splat
! Clearly that isn’t what is intended.
This is happening because of the first two rules below (the second two rules are correct):
https://emtr0-dev.netlify.app/ https://emtr0.dev/:splat 301!
http://emtr0-dev.netlify.app/ https://emtr0.dev/:splat 301!
https://emtr0-dev.netlify.app/* https://emtr0.dev/:splat 301!
http://emtr0-dev.netlify.app/* https://emtr0.dev/:splat 301!
To resolve this, change the first two rule to remove “:splat”:
https://emtr0-dev.netlify.app/ https://emtr0.dev/ 301!
http://emtr0-dev.netlify.app/ https://emtr0.dev/ 301!
https://emtr0-dev.netlify.app/* https://emtr0.dev/:splat 301!
http://emtr0-dev.netlify.app/* https://emtr0.dev/:splat 301!
To summarize, the “:splat” on the target is only required if there is wildcard ("*") on source. Leave the splat on the second two rules and remove it from the first two above. Then trigger a new deploy to have the redirect changes take effect.
If that change doesn’t resolve this (or if there are other questions), please let us know.