Forum Discussion
Christian_15126
Nimbostratus
Jan 24, 2013irule switch statement not matching header or paths
Marketing has hit me with another irule fun project. This is what they want me to accomplish:
They want 60/40 split load balancing between the following URL's:
-------------- 40% -...
Christian_15126
Nimbostratus
Jan 25, 2013With the following variables (leaving our the host and path variables to make is simple):
current == 0
ratio == 4
max == 10
mktvar == redirect=true
I'm trying to match:
HTTP:;host
AND HTTP::path
AND current < ratio
APPEND TO PATH w/ HTTP::query AND mktgvar
INCR current
OR current < max
301 REDIRECT w/ HTTP::query AND mktgvar
INCR current
(Rinse and repeat five times for five different paths and redirects)
OR
(To close the loop, reset the count to 0, close out the session. and the event)
SET current == 0
TCP close
EVENT disable
I know how to do it with just if/else statements, but it's uggly..
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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