Forum Discussion
Tokyo_Jihen_931
Dec 03, 2010Nimbostratus
iRule for URL persistence
Hello all,
I am a newbie of iRules programming. My system is BIG-IP 9.1.2. I am trying to implement persistence using a string that appear in URL.
For example.
http:...
hooleylist
Dec 03, 2010Cirrostratus
Maybe something like this?
when HTTP_REQUEST {
Check for /install/ or /scripts/ in the path
switch -glob [HTTP::path] {
"*/install/*" {
Parse the URI "directory" after install. Look for /install/, skip 9 characters and match up to the next /.
set session_id [findstr [HTTP::path] /install/ 9 /]
}
"*/scripts/*" {
Parse the URI "directory" after scripts. Look for /scripts/, skip 9 characters and match up to the next /.
set session_id [findstr [HTTP::path] /scripts/ 9 /]
}
default {
set session_id ""
}
}
if {$session_id ne ""}{
Persist on the parsed session ID for X seconds
persist uie $session_id 1800
}
}
Aaron
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