Forum Discussion
WaterlooSysAdmi
Cirrus
Aug 28, 2019IRule - Routing
Hello, I need to apply two iRules to a virtual server. One that routes traffic to a certain pool of servers based on the release version in url, 8.32.4. Say https://test.abc.com/dr=dfgv8.32.4...
WaterlooSysAdmi
Cirrus
Sep 27, 2019ok, so i ran into an issue with the cookie. The cookie for example will always be "cookieName" but I need to route according to the version that's inside the cookie. Is there an irule that will do that?
Sep 27, 2019
Hi,
Can you try this iRule?
when HTTP_REQUEST {
if { [HTTP::cookie exists "cookieName"] } {
set cookieValue [HTTP::cookie value "cookieName"]
# log local0. "CookieValue: $cookieValue"
if { $cookieValue contains "8.32.4" } { pool pool_A }
elseif { $cookieValue contains "8.32.5" } { pool pool_B }
else { pool pool_Z }
}
else {
pool pool_default
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects