Forum Discussion
What_Lies_Bene1
Jan 02, 2013Cirrostratus
Your 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"
}
}
}
}