Forum Discussion
pmaubo2_55685
Nimbostratus
Oct 31, 2012HTTP::header User-Agent question
I have an irule for we are setting up for featured mobile phones and smart phones.
1 data class list many different codes, for example nokia, the non-smartphones.
The other data class just ...
What_Lies_Bene1
Cirrostratus
Oct 31, 2012Try this;
when HTTP_REQUEST {
set wap https://wapsite.com/uri
set normal https://normal.com/uri
set smart https://smartphonesite.com/uri
if { [HTTP::host] equals "https://mysite..com" } {
if { [class match -- [string tolower [HTTP::header User-Agent]] contains user_agent_tokens_class] }{
log local0. "wap phone"
HTTP::redirect $wap
return }
elseif {[class match [string tolower [HTTP::header User-Agent]] contains mobile_device_providers] } {
log local0. "smart phone"
HTTP::redirect $smart
return }
else {
log local0. "Normal web site"
HTTP::redirect $normal
}
}
}
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