Forum Discussion
Meena_60179
Nimbostratus
May 04, 2010Pool Settings on Http redirect
I have two pools in one virtual server both pool serves different applications (like gmail & docs) and there is one pool for authenticating user request which is default pool for this virtual server, ...
Meena_60179
Nimbostratus
May 04, 2010Here is the iRule I am using
when HTTP_REQUEST {
set uri [ HTTP::uri ]
if { $uri contains "myapp" } {
find out if session id is defined
set sessionId [ HTTP::cookie "JSESSIONID" ]
if { $sessionId == "" } {
look for auth cookie
set authCookie [ HTTP::cookie "auth.mail.com" ]
set location [HTTP::cookie "mail_location" ]
if { $authCookie != "" and $location != "" } {
if { $location equals "mailloc" } {
pool appserver_pool_1
} elseif {$location equals "docloc" } {
pool appserver_pool_2
}
}
else {
Redirect to authentication page
HTTP::redirect "http://10.10.0.1/auth/"
}
} else {
persist session
persist uie $sessionId 3600
}
}
}
when HTTP_RESPONSE {
set SessionId [HTTP::cookie "JSESSIONID"]
if { $SessionId != "" }{
log "app server has set JSESSIONID $SessionId add persistence"
persist off session id for an hour (3600 seconds)
persist add uie $SessionId 3600
}
}
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