Forum Discussion
How to create Policy rul to match HTTP::URI path contains
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:
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
