Forum Discussion
dundovic_25174
Oct 05, 2011Nimbostratus
Missing a script after "if"
I'm testing an iRule that'll redirect to a specific site in case both specific user agent and specific cookie are contained in request. I wrote following:
---
when HTTP_REQUEST {
...
nitass
Oct 05, 2011Employee
can u try this?
when HTTP_REQUEST {
if {[class match [HTTP::header "User-Agent"] contains list_of_agents]} {
if {[HTTP::cookie exists "OREO"] and [HTTP::cookie value "OREO"] ne "empty"} {
HTTP::redirect "http://site1/"
log local0.info "REDIR"
} else {
HTTP::redirect "http://site2"
log local0.info "NOREDIR"
}
}
}
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