Forum Discussion
Parveez_70209
Nimbostratus
Jun 11, 2014How to Prevent xyz-da-bhht.abc.net from Redirecting to HTTPS
We are having an issue with the Intermittent URL: xyz-da-bhht.abc.net which is served by pool: ctx-da-bhht but this is mainly because of the handheld RF scanners, might be these are breaking while re...
Thomas_Gobet
Nimbostratus
Jun 11, 2014Hi,
I think you have to use a flag to know if your host is bhht or not.
when HTTP_REQUEST { check to see if traffic is sourcing from private circuit to not redirect to https
set bhht 0;
switch -glob [string tolower [HTTP::host]] {
"xyz-da-bhht.abc.net" { pool ctx-da-bhht }
$bhht=1;
}
check for pages needing to not redirect to https
switch -glob [string tolower [HTTP::uri]] {
"*/getxsl.asp*" { pool ctx-da-app }
"*/RadSOMsgReceiverTri.asp*" { pool ctx-da-app }
"*/RadSOFileTransfer.asp*" { pool ctx-da-app }
"*/Reader.sod*" { pool ctx-da-app }
"*/clockserver.asp*" { pool ctx-da-app }
"*/webapp*" { pool ctx-da-bhht }
default {
if { $bhht -eq 0) {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
}
}
- Cory_50405Jun 11, 2014
Noctilucent
In addition, make sure your match strings don't contain capital letters since you are converting the URI string to lowercase. Otherwise those conditions will never match.
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