Reputation: 291
Is there a way/syntax to redirect calls with an AWS ELB rule if a certain query parameter is missing?
I couldn't find anything related to empty query parameters in the docs https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#query-string-conditions.
My use case would be to redirect back to app front page if e.g. query param id
is empty.
Upvotes: 0
Views: 1695
Reputation: 3642
You can use a wildcard *
to match all values. Hence, you can configure a rule with id
query string and *
as value, to catch requests with id
parameter.
Then in the default route, forward to your app front page.
Upvotes: 1