Negating traffic policy rules
Hoping someone can help me out with this. Recently tried deploying a traffic policy to redirect users to https if the URI contains a list of different strings, and to redirect back to http if it does not contain a list of strings.
Logic seemed simple. As an example:
HTTP virtual server: if URI path contains login.php, redirect to the same host/URI over https.
HTTPS virtual server: if URI path NEGATE contains login.php, redirect to same host/URI over http.
The contains works great, but the minute I negate the same rule for my https server, I wind up in a redirect loop. so even if my http request is sent is I get redirected to http, which in turns redirects me back to https, looping me indefinitely. What I expected to happen was the traffic policy would be evaluated and since I was already using HTTPS and my URI contained login.php, I would not get a 302 redirect.
I can get all this to work by changing my negate rule to use STARTS WITH instead of CONTAINS, however this limits me if I need to specify different URI path's that aren't stored at the root of the web server.
Has anyone run into this or can someone explain the the boolean logic for contains and how it changes when it is negated? It is not working as I would expect.
Thanks all,
-GR