Forum Discussion

Ken_49643's avatar
Ken_49643
Icon for Nimbostratus rankNimbostratus
Dec 06, 2013

LTM 11.4 Traffic Policy Conditions and Regular Expressions

I am trying to create some traffic policies that use regular expressions to match a URL. When using an HTTP Class with the following regex "^/api/rest/.*", requests such as /api/rest/blah would match as expected, however this regex won't work with a traffic policy. I can get a traffic policy to match using "starts_with" and "/api/rest" as the value.

 

This is fine for the simple case but if I need to match a URI with a regex "^/api(/.*)?/blah "starts_with" won't work. In fact simple regexes don't seem to work at all with traffic policy conditions. Has anyone had any success with traffic policies and using a regexes in the condition?