Forum Discussion
Rodrigo_N_Soare
Nimbostratus
Apr 24, 2014Redirect Mobile with exception HTTP::uri
Hello,
I need to create a irule that detects the user-agent and redirect to mobile http://mobile.xpto.br except for some uri like "/ test". If uri contain "/test" or "/abc" in the not redirect.
Can ...
Kevin_Stewart
Employee
Apr 24, 2014The formatting was a bit off but pretty close nonetheless:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP :: header User-Agent]] starts_with group_user_agent] } {
if { ( [string tolower [HTTP :: uri]] starts_with "/test" ) or ( [string tolower [HTTP :: uri]] starts_with "/abc" ) } {
pool_Site_Corporativo pool
} else {
HTTP :: redirect "http://mobile.caixaseguros.com.br"
}
}
}
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