I have a system where I use a load balancer to do path-based redirects where depending on the path, it will redirect to a different domain or EC2 app. 8 The way I have it set up now, all HTTP requests get forwarded to HTTPS, and that works fine.
For all HTTPS requests, I want it so that a path to www.abc.com/* always gets redirected to www.abc.app/* EXCEPT for one path, which is www.abc.com/game
I have two listeners setup:
The issue is, listener #1 seems to be completely ignored because the www.abc.com/game path gets redirected to www.abc.app/game instead of routing it to the EC2 server.
I checked my conditional logic and I have it as the following: If abc.com/game OR www.abc.com/game OR variations containing the "https" prefix then redirect to EC2 target group
Is there any clue as to why this listener is not triggering?
You should set the rule to have a host header
condition and then a path
condition as in the screenshot below:
This is the high priority rule. You can also forward if there is any suffix to /game by using below rule: