BIG-IP Solutions: Simple URL Redirects

Check out our "BIG-IP Solutions" series where we will dive into all kinds of cool features related to the BIG-IP.  In this edition, I'll take a look at simple URL redirects where I'll show how to redirect traffic from one web page to another. 

Many people use iRules for URL redirects, but the BIG-IP offers policies to do this for you. Policies are faster than iRules, they are easier to manage, and you don't have to know the exact scripting language code to use them.  Check out this video to learn more about how to redirect URLs with policies!


 

 

Published Oct 25, 2018
Version 1.0
  • Hi John,

     

    can we do http to https also in Policies. Usually we do it in irule to redirect http to https. The same function can do in policies.

     

  • Hi Vijay,

    you can use Policies to do generic HTTP to HTTPS redirects. You can even use TCL in Policies.

    Here an example to do a generic HTTP to HTTPS redirect:

    Condition: No
    Action: Redirect ==> tcl:https://[getfield [HTTP::host] : 1][HTTP::uri]
    

    I hope this helps.

    Kind regards,

    Gilles

  • Fairly simple example for an entire site redirect. The more useful application would be for vanity redirection. something that i maintain iRules and class tables to handle. Also be able to specify a 301 redirect rather than 302 for google analytics.

     

    Seeing that TCL can be used in policies, it may be possible to 301 redirect then, it seems?!

     

  • Redirect from .CA extension to a .COM Extension

    I need help in trying to redirect from .CA extension to a .COM extension.   This is a SNI site with a large amount of I-Rules.  Here is the I-Rule we are trying to redirect.  

    This is what we thought would work.  Simple Redirection

    elseif { [HTTP::host] == "testing.ca" } {
    HTTP::redirect "https://www.testing.com"} 

    Thank you for your help!