Forum Discussion

khalimaila_1354's avatar
khalimaila_1354
Icon for Nimbostratus rankNimbostratus
Oct 11, 2013

Redirect for multiple URL

Hi,

 

This might be a very simple question, I'm not really a good programmer :(... How can we redirect the traffic to one URL(F5 link) with two 'if' urls:

 

Example: If User types any of the below two URLs, traffic should be routed to (F5 link) www.test.company.com using an irule: www.test.company.com/user www.test.company.com/irj/portal

 

Thanks, Bob

 

2 Replies

  • Try this:

    when HTTP_REQUEST {
        switch [string tolower [HTTP::uri]] {
            "/" -
            "/irj/portal" {
                HTTP::redirect "http://www.test.company.com/user"
            }
        }
    }