cancel
Showing results for 
Search instead for 
Did you mean: 
ltwagnon
Legacy Employee
Legacy Employee

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!


 

 

Comments
Vijay_1982_1648
Nimbostratus
Nimbostratus

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.

 

Gilles_from_Lux
Nimbostratus
Nimbostratus

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

 

brad_11480
Nimbostratus
Nimbostratus

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?!

 

marvwill61
Nimbostratus
Nimbostratus

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!

 

 

 

 

Version history
Last update:
‎25-Oct-2018 10:59
Updated by:
Contributors