Phil_Rudich_735
Dec 05, 2007Nimbostratus
Redirect Issue
Having a small issue with my iRule. We are trying to first redirect any request that come in on port 80 to use https, then perform a host replace (see code below). However, when I hit the site, sometimes it comes up fine and other times we get a "page not found" error. It's not consistent and can't figure out if it's the code or a pool issue.
when HTTP_REQUEST {
if { [TCP::local_port] == 80 } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else
{
if { [HTTP::host] equals "www.xxx.company.com"} {
HTTP::header replace "Host" "zzz.company.com"
if { [HTTP::uri] starts_with "/FOO" } then
{
} else {
switch -glob [HTTP::uri] {
"/*" -
"/images/*" -
"/bin/*" {
HTTP::uri "/FOO[HTTP::uri]"
}
}
}
}
}
}
Please help!
Thanks,
Phil