Forum Discussion
yuanqiang_22112
Nimbostratus
Feb 09, 2017irules: replace mobile client header and pool redirect
Hi: for these images ,when mobile clients visit server,F5 load balance mobile server ; Because of mobile server bind domain ";, so I need F5 to replace mobile clients header to be ";. I write the irules ,but not work ,please help look . Thank you !
1 Reply
Looks fine to me, but you might want to do a string to lower when comparing the user agent:
when HTTP_REQUEST { set ua [string tolower [HTTP::header User-Agent]] if { $ua contains "mobile" and $ua contains "android" } { HTTP::header replace "Host" "www.new-site.com" pool pool_mobile } }/Patrik
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