Forum Discussion
Sorry, but it was not my intention to submit this question without context. My goal is to check the URI to see if it contains "logout", but does NOT include "service". This would make it a default Service Logout if NO specific logout service is specified. I have a working iRule (included below) and I tried to recreate it with a Traffic policy. The policy causes a "Too many redirects" error. It seems like I am misunderstanding the logic or the parameters used in the policy conditions, but I cannot figure out how.
Here are the details: Below I included my existing iRule, which seems to work fine. when I visit "; it does a single redirect to my desired logout endpoint
when HTTP_REQUEST { if { ( [HTTP::uri] contains "logout" ) and !( [HTTP::uri] contains "service" ) } { HTTP::redirect "https://mycasserver.com/cas/logout?service=https://federatedhost.com/common/wsfederation?wa=wsignout1.0"; }
I reviewed the policy manual here: https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/local-traffic-policies-getting-started-12-1-0/1.html
I created a policy and when I trace the headers it keeps redirecting repeatedly until the redirect threshold is reached and error ensues. Below is my policy: