Reformatting for thread. Sorry.
when HTTP_REQUEST {
set query [HTTP::query]
log "HttpRequest"
if { [class match -- [string tolower [HTTP::header "User-Agent"]] contains mobile_redirected_devices] } {
log "Matched User Agent"
if { [string tolower [HTTP::host]] contains "www" && ([string tolower [HTTP::uri]] contains "par.html") } {
pool WWW-PreProd-Pool-80
log "Sent to PreProd Pool"
}
if { [string tolower [HTTP::uri]] contains "favorites.html" } {
HTTP::redirect https://www.myothersite.com/en-us/mobile/cmobile.html
log "Redirect to Prod CMobile"
}
if { [string tolower [HTTP::uri]] contains "/en-us/home.html?verifyPasswordToken=&token="} {
HTTP::redirect https://mobile-preprod.mysite.com/directory/pages/mobile/password-reset.jsp?token=$query
log "Redirect to Pass Reset"
}
if { [string tolower [HTTP::uri]] contains ".html" } {
HTTP::redirect http://m.mysite.com log "Redirect to M"
}
}
}
Code