Forum Discussion

Pav_70755's avatar
Pav_70755
Icon for Nimbostratus rankNimbostratus
Sep 30, 2010

HTTP Re-Direct Intermittant in IE

Am having issues with certain URL's re-directing in Internet Explorer in that it works after 4 or 5 refreshes however the re-direct works fine and first time in FireFox and Chrome.

Un-comment the following lines if the site uses SSL
when CLIENT_ACCEPTED {
            TCP::collect 5
        }               
when CLIENT_DATA {
        if { [matchclass [TCP::payload] starts_with $::http_methods] } {
            SSL::disable
        }
}
when HTTP_REQUEST {
        set client [IP::client_addr]
        HTTP::header insert "CLIENT" $client
        if { [TCP::local_port] eq "80"  } {
            persist source_addr 1800
            HTTP::fallback http://support.domain.com/
 Un-comment the next 3 lines for redirects and expand out with elseif's if needed 
               if { [HTTP::host] eq "192.168.1.1"  } {
                  HTTP::header replace "host" "www.domain.com"
                  pool wwwDEFAULT
        }
        elseif { [HTTP::uri] starts_with "/ecta"  } {
            HTTP::redirect "http://www.domain1.org"
        }
        elseif { [HTTP::uri] ends_with "/journals/ecta/member.htm"  } {
            HTTP::redirect "http://www.domain2.org/memb.asp"
        }
        elseif { [HTTP::uri] starts_with "/journals/ecta"  } {
            HTTP::redirect "http://www.domain3.com/bw/journal.asp?ref=0012-9682"
        }
        elseif { [HTTP::uri] ends_with "/memb.asp?ref=0012-9682"  } {
            HTTP::redirect "http://www.domain1.org/memb.asp"       
           }  else {
                  pool wwwDEFAULT
 Un-comment the net line if using redirects
           }
        }   elseif { [TCP::local_port] eq "443"  } {
            HTTP::header insert "BPL-SSL" "On"
            pool wwwDEFAULT
        } else {
        set srvr [findclass [TCP::local_port] $::Individual_Servers " "]
        if { $srvr ne "" } {
           node $srvr 80
        }  else {
 Replace HTTP://sitename with the default URL of the site
          HTTP::redirect "http://www.domain.com/"
      }
   }  
}

  • I haven't thoroughly examined your code, but is it possible that the various conditions would result in multiple redirects? You're limited to a single redirect per client connection.