Forum Discussion
haxzorian_35595
Aug 21, 2012Nimbostratus
Strange Redirect Behavior
We have a webpage that our technicians use when on customer sites to pair devices. The page itself is just an HTML blob with some CSS and a few java script files that execute when triggered. ...
Couple of things come to mind.
First, as a best practice, you should include a "--" in your switch statement. This tells the switch command that there are no more arguments, so someone construct a request URI starting with a "-" character and break your rule.
Second, your switch is not using a "-glob" argument. If you don't have a default pool on the VIP and the request URI doesn't exactly match "/devicepairingstage" or "/devicepairing", the LTM has nowhere to send the traffic.
Perhaps you should try something like this:
timing on
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/devicepairingstage*" {
pool ianappsstage-pool-https
log local0.debug "uri: [HTTP::uri]"
log local0.debug "[client_addr] hit devicepairingstage"
}
"/devicepairing*" {
pool ianapps-pool-https
log local0.debug "uri: [HTTP::uri]"
}
}
}
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