Forum Discussion

Babar_Ansari's avatar
Babar_Ansari
Icon for Nimbostratus rankNimbostratus
Nov 06, 2019

url redirection to another url hosted on the same F5 device

Hi,

 

I have a requirement to perform url redirection from url 1 to url 2. Both url's have their VIP configured on the same F5 device.

url 1 : http://abc.xyz.com

url 2: http://pqr.xyz.com/123

 

I need assistance in configuring policy/irule to achieve the above. any assistance would be greatly appreciated.

 

Regards,

Babar

 

3 Replies

  • You can do a quick irule, some thing like this:

    when HTTP_REQUEST {
      switch [string tolower [HTTP::host]] {
         "abc.xyz.com" {
              HTTP:redirect "https://pqr.xyz.com/123"
         }
      }
    }
  • Hi Ross,

     

    Have already tried the same but it did not work

     

    Regards,

    Babar Ansari

  • Use log local0 statements within the iRule to identify if the iRule is being triggered. It will be helpful if you can let us know what is going wrong with the above iRule. May be use curl statements to identify the response for each HTTP Request.