Hi!
So we have an iRule which matches the URI against a datagroup via equals, nothing out of the ordinary:
when HTTP_REQUEST {
set matchedEquals [class match -value [string tolower [HTTP::uri]] equals dg_list]
if {$matchedEquals ne ""} {
HTTP::respond 301 Location "$matchedEquals"
unset matchedEquals
}
}
We recently had a case where there are 2 similar URI’s in the datagroup:
- /api :=
- /api/demo :=
We find that the iRule is able to match /api, but is unable to match for /api/demo. From what I understand, the equals operator would match the longest key, so not exactly sure why it is failing to match.
Any help would be much appreciated. Thanks in advance!