Forum Discussion
bruno_thomas_12
Nimbostratus
Jul 25, 2005Basic HTTP redirect question on LB pool
when HTTP_REQUEST
if HTTP:URL contains '/acces'
pool bea_pool
It seems like all subsequent requests are redirected to home page of the web servers, Http host/acce...
unRuleY_95363
Jul 25, 2005Historic F5 Account
Well, there is nothing that would otherwise prevent that from working. However, I'm not entirely sure that it accomplishes what you want. I think you may be better off using a Cookie to save the context across requests. For example:
when CLIENT_ACCEPTED {
set add_cookie ""
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "MyCookie"] } {
MyCookie contains the original pool used
pool bea_pool
} else {
This must be the first access
if { [HTTP::uri] contains "acces" } {
pool bea_pool
set add_cookie bea_pool
} elseif { [HTTP::uri] contains "aide" } {
HTTP::redirect "http://10.172.155.201/[HTTP::uri]"
} else {
What should happen here?
Is there a default pool on the VS that
will be used if none is specified here?
}
}
}
when HTTP_RESPONSE {
if { $add_cookie ne "" } {
HTTP::cookie insert name "MyCookie" value $add_cookie
set add_cookie ""
}
}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