Forum Discussion
Pirlo
Nimbostratus
Mar 14, 2014URI Not Triggering Redirect properly
Ok i have fought with this for about 4 hours now. I am focusing on this portion of the rule below
if { [string tolower [HTTP::uri]] contains "/en-us/home.html?verifyPasswordToken=&token="} {
HT...
Pirlo
Nimbostratus
Mar 14, 2014Reformatting 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"
}
}
}
CodeHelp 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