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

MMaaroufi's avatar
MMaaroufi
Icon for Nimbostratus rankNimbostratus
Jul 02, 2019
Solved

URL redirect

Hi everyone,   I need to create an iRule that can manage these modification:   HOST “abc-ppi” ==> “abc” Modify URI "/a/b/c" ==> "/a/b/c-ppi" NOT modifying any other URI   Any suggestion ple...
  • Andy_McGrath's avatar
    Jul 02, 2019

    Very explicit but this what you need?

    event HTTP_REQUEST {
      if {[string tolower [getfield [HTTP::host] ":" 1]] eq "abc-ppi"} {
          HTTP::header replace "Host" "abc"
      }
      if {[string tolower [HTTP::uri]] eq "/a/b/c"} {
          HTTP::uri "/a/b/c-ppi"
      }
    }