Forum Discussion

Anush's avatar
Anush
Icon for Nimbostratus rankNimbostratus
Nov 09, 2015

redirection irule

Hi,

 

not sure is it something possible or not?

 

for example, site ABC.com and DEF.com both are hosted on one F5. now customer wants to redirect ABC.com/* to DEF.com/. "" means whatever it type after host, it get redirect to other site with same URI.

 

more example

 

ABC.com/image.aspx to DEF.com/image.aspx ABC.com/audio to DEF.com/audio

 

Thanks in advance for your help.

 

1 Reply

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Anush,

    How about:

    when HTTP_REQUEST {
      if { [string tolower [HTTP::host]] eq "abc.com" } {
        HTTP::redirect "def.com[HTTP::uri]"
      }
    }
    

    Hope this helps,

    N