Forum Discussion
htuytela_37346
Nimbostratus
Dec 12, 2013iRule check for user-agent and set cookie
Hi,
I'm trying to get an iRule to work that checks on User-Agent, being IE6,7,8 and setting a cookie. Basically, I want those browsers to be redirected to another page, and set a cookie. When the...
Kevin_Stewart
Employee
Dec 13, 2013Try this:
when HTTP_REQUEST {
switch -glob [HTTP::header value "User-Agent"] {
"*MSIE 6*" -
"*MSIE 7*" -
"*MSIE 8*" {
if { not ( [HTTP::cookie exists "test"] ) } {
HTTP::redirect "http://test-lab.foo.com:9610/CG510_APR_RedirectCapriURL/"
} else {
what do you do if the cookie exists?
}
default {
pool site-10.130.14.98_29710
}
}
}
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