Forum Discussion
David_Hillman_3
Nimbostratus
Jun 17, 2006Reverse Proxy/Redirect/Cookie Presence
I'm a new user of BIGIP and TCL so please forgive me for the possibly obvious post. Would someone please provide some guidance on what I am doing wrong? Getting all kinds of errors when attempting i...
David_Hillman_3
Nimbostratus
Jun 20, 2006I scrapped some code together and though I would pass it on.
when HTTP_REQUEST {
set requested_URI [string tolower [HTTP::uri]]
HTTP::header replace Host: abc.insidecompany.com
if {[HTTP::cookie exists "test"]} {
if { $requested_URI contains "/ltm" or $requested_URI starts_with "ltm" } {
log local0. "Cookie test exists, redirecting to $requested_URI pool POOLA"
pool POOLA
} elseif {$requested_URI contains "/gtm" or $requested_URI starts_with "gtm" } {
log local0. "Cookie test exists, redirecting to $requested_URI pool POOLA"
pool POOLA
} elseif { $requested_URI contains "/F5" or $requested_URI starts_with "F5" } {
log local0. "Cookie test exists, redirecting to $requested_URI pool POOLB"
pool POOLB
}
}
else {
if { $requested_URI contains "ltm" or $requested_URI starts_with "ltm" } {
log local0. "Cookie test does not exist, redirecting to $requested_URI pool POOLA"
pool POOLA
} elseif { $requested_URI contains "F5" or $requested_URI starts_with "F5" } {
log local0. "Cookie test does not exist, redirecting to $requested_URI pool POOLB"
pool POOLB
}
}
}
when HTTP_RESPONSE {
HTTP::header replace Host: abc.outsidecompany.com
}
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
