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

Rasool1224's avatar
Rasool1224
Icon for Nimbostratus rankNimbostratus
Mar 20, 2018

change http header

Hi

 

I have one http server and created a Virtual server with the help of iApp, application is working fine with https. but i would like to change the url, please advice present url - https://A.myapp.com want to change as - https://B.myapp.com

 

Please recommand, which iRule should i use or any other service profile need to create to replace the header.

 

thank you

 

1 Reply

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    Try below irule , you should hve http profile enabled under VS

    when HTTP_REQUEST {
         if { [string tolower [HTTP::host]] equals "a.myapp.com" } {
              HTTP::respond 301 Location "https://b.myapp.com[HTTP::uri]"
         }
    }
    
    or 
    
    when HTTP_REQUEST {
    if { [HTTP::host] equals "A.myapp.com"} {
    HTTP::redirect "https://B.myapp.com"
    }