I want to set a redirect rule on AWS Application Load Balancer. I added Route53 entries to assign ALB for domains. When I try to set a redirect rule on ALB listener it supports Subdomain conditions but only allows to set "Host" for action part.
What I want to do is set a wildcard condition and then redirect that subdomian to same subdomain on different host.
For example:
www.example.net -> www.example.com
test.eaxmple.net -> test.example.com
prod.example.net -> prod.example.com
We have different subdomains and couple more will be added every month so I don't want to assign one by one. Instead expect ALB to get a wildcard domain and redirect it to same domain. And I don't want to assign an EC2 server just for this single job and create a bottleneck with it.