Forum Discussion
chungyu_16122
Altostratus
Jan 02, 2013Redirects to a mobile site not being completed by iRule
Hi I wrote this irule, the redirect stops at http://desautels.mobilize.com and does not actually redirect to the full path desired, does anyone have a suggestion? I am using Chrome but with a user-a...
What_Lies_Bene1
Cirrostratus
Jan 02, 2013Your if is wrong, you really need a space after the Mozilla line, before the hyphen and the redirect line is in the wrong place. Here's my rewrite;
when HTTP_REQUEST {
if { (([string tolower [HTTP::host]] equals "www.mcgill.ca") && ([string tolower [HTTP::uri]] equals "/desautels/programs/isp")) } {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*blackberry*" -
"Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5*" -
"*Android*" -
"*Windows Phone OS*" {
HTTP::redirect "http://desautels.mobilizeme.com/undergraduate_programs/isp"
}
}
}
}
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