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

ngmoletsane_156's avatar
ngmoletsane_156
Icon for Nimbostratus rankNimbostratus
Jul 23, 2015

irule to redirect more than one url string to a sorry link.

I am currently redirecting one string, i am nor sure how i should configure the second string of the same url

so when i access home.co.za/hello it should redirect me to an oopps page. i also want the same for home.co.za/bye. Where to i configure this, do i include another if statement below that one or can i say 'contains "hello" or "bye"

Please help me guys, i hope my question makes sense.

home.co.za { if { ([HTTP::uri] contains "hello") } {

          HTTP::redirect https://oppspame.co.za.html 

}

     pool home.co.za-443
  }

1 Reply

  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account

    For this I would use a Switch statement

    switch [HTTP::uri] {
        "/hello" {
           HTTP::redirect https://oppspame.co.za.html 
        }
        "/bye" {
            HTTP::redirect https://oppspame.co.za.html 
        }
        default {
            pool home.co.za-443
        }      
    }