AWS Amplify: How to redirect multiple domains to different destinations?

0

In Amplify it's easy to configure a number of domains, get SSL zerts assigned and get the requests in. Instead of letting an application redirect, I want to directly use the redirect feature. So if I can reach the app with https://domain-a.com and https://domain-b.com, configure redirects with
[ { "source": "https://domain-a.com/<*>", "target": "https://domain-d.com/path-x/<*>", "status": "302", "condition": null }, { "source": "https://domain-b.com/<*>", "target": "https://domain-e.com/path-y/<*>", "status": "302", "condition": null } ] and call https://domain-b.com/asdf.html the result will allways be a use of the first redirect setting and ignoring the domain completely. Even without <*> it will behave the same and ignore the domain. Tried a number of combinations, with and without pathes, ...

Any idea? Not useful to do so? The documentation in https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#simple-redirects-and-rewrites seems to allow domain redirects ...

feita há 8 meses204 visualizações
1 Resposta
0
Resposta aceita

Hello,

Thank you for reaching out to us.

Amplify currently does not support the use of the domain + path in the source address of the redirect rule. We can either use the domain or the specific path as the source rule. You may refer below GitHub that is raised as Feature Request for the same.

https://github.com/aws-amplify/amplify-hosting/issues/97#issuecomment-528567207

Hence, I would suggest you to track the above existing open GitHub Issue in order to actively track the update on the feature request.

AWS
ENGENHEIRO DE SUPORTE
respondido há 8 meses
profile picture
ESPECIALISTA
avaliado há 2 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas