For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Gary_Bristol_19's avatar
Gary_Bristol_19
Icon for Nimbostratus rankNimbostratus
Nov 10, 2015

I don't know why i can get these figured out, it is redirecting laserfiche properly but not the llforms

when HTTP_REQUEST {
  set lhost [string tolower [HTTP::host]]
  set lpath [string tolower [HTTP::path]]

  if { ($lhost equals "laserfiche.ou.edu")}{
       if {($lpath equals "/") }{
           HTTP::redirect "https://laserfiche.ou.edu/laserfiche"
    }
    if { ($lhost equals "lfforms.ou.edu")}{
       if {($lpath equals "/") }{
           HTTP::redirect "https://lfforms.ou.edu/forms"
}
}
}
}

1 Reply

  • Your conditionals are embedded in an undesirable way. Basically, you check for the host lfforms.ou.edu inside of the

    if
    that checks for laserfische.ou.edu. A
    switch
    makes this a bit easier anyhow, and since you check for the same HTTP::path in each case:

    when HTTP_REQUEST {
        if { [HTTP::path] equals "/" } {
            switch [string tolower [HTTP::host]] {
                "laserfische.ou.edu" {
                    HTTP::redirect "https://laserfische.ou.edu/laserfische"
                }
                
                "lfforms.ou.edu" {
                    HTTP::redirect "https://lfforms.ou.edu/forms"
                }
            }
        }
    }