Forum Discussion
Todd_Jones_1074
Nimbostratus
Sep 18, 2012HTTP::redirect cause reset
Hello,
I've been given a requirement to ensure that a URI is passed to the web servers with the correct case. For example:
www.host.com/CASEmatters is correct
www.host.com/casematter o...
Kevin_Stewart
Employee
Sep 18, 2012I'd skip the nested switch evaluation and just trigger the casematters code if the [string tower [HTTP::uri] equals "/casematters". Also, assuming you don't need the client to actually see the different case in the address bar, just change the HTTP::uri on ingress.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/foo*" {
log local0. "foo pool"
pool foo
}
"/bar*" {
log local0. "bar pool"
pool bar
}
"/casematters*" {
log local0. "casematters pool"
pool casematters
set sub_uri [findstr [string tolower [HTTP::uri]] "/casematters" 12]
log local0. "sub_uri = $sub_uri"
HTTP::uri "/CASEmatters$sub_uri"
}
default { pool default }
}
}
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