Todd_Jones_1074
Sep 18, 2012Nimbostratus
HTTP::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 or /CaSeMaTtErS need to be redirected to /CASEmatters.
I've tried HTTP::redirect, HTTP::uri and HTTP::respond. All of them result in a reset instead of a redirect.
Here is my iRule with the redirect. Any help you can provide will be appreciated.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/foo*" { pool foo }
"/bar*" { pool bar }
"/casematters*" {
switch -glob [HTTP::uri] {
Check URI for match to desired case "CASEmatters"
"/CASEmatters*" { pool casematters }
If it doesn't match then redirect
default { HTTP::redirect "https://[HTTP::host]/CASEmatters" }
}
}
default { pool default }
}
}