Forum Discussion

Daniel_104050's avatar
Daniel_104050
Icon for Nimbostratus rankNimbostratus
Aug 23, 2012

Re-direct question

I am new to F5 and I don't know how to word the search to find an answer so please bear with me.

 

 

I have external users going to a site that is having its name changed. I want to do a redirect to the new site. easy

 

The site is an https:// and I need it to redirect to the new https:// I have a cert on the existing and will buy a cert for the new but I want the users to actually see in the browser bar the new address. I am thinking this can be done with a 301 redirect?

 

 

 

can the following be done?

 

 

 

https:// abc.com --> VIP --> redirect in browser --> https:// newabc.com --> VIP

 

  • is it same vip or different one?

    if it is different one, can you try something like this?

    [root@ve10:Active] config  b virtual bar list
    virtual bar {
       destination 172.28.19.79:443
       ip protocol 6
       rules myrule
       profiles {
          clientssl {
             clientside
          }
          http {}
          tcp {}
       }
    }
    b[root@ve10:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
       if {[string tolower [HTTP::host]] equals "abc.com"} {
         HTTP::respond 301 Location "https://newabc.com[HTTP::uri]"
       }
    }
    }
    [root@ve10:Active] config  curl -Ik https://172.28.19.79/something -H "Host: abc.com"
    HTTP/1.0 301 Moved Permanently
    Location: https://newabc.com/something
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0
    
    

    if it is same one, you may check about sni.

    sol13452: Configuring a virtual server to serve multiple HTTPS sites using TLS Server Name Indication (SNI) feature

    http://support.f5.com/kb/en-us/solutions/public/13000/400/sol13452.html

    Multiple Certs, One VIP: TLS Server Name Indication via iRules by Colin

    https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086451/Multiple-Certs-One-VIP-TLS-Server-Name-Indication-via-iRules.aspx

    hope this helps.
  • Second question, can a redirect and stream be in the same irule?why not? anyway, may you explain what you want? so, people here may be able to give you idea or example.