EMAIL SUPPORT

dclessons@dclessons.com

LOCATION

AF

iRule http Redirect

iRule http Redirect

LAB: Configure iRule that detects server response and redirect 404 responses to a different server.

Topology:

Solution:  

Create three different Pool

  • Pool 1: 172.16.10.129 : Port : All Services
  • Pool 2: 172.16.10.130 : Port : All Services
  • Pool 3: 172.16.10.131 : Port : All Services

Refer below figure to configure three pools.

Configure iRule

Here first we will use same Virtual server which we created in last lab.

Go to Browser and access http://10.10.10.105/?user=me

And then http://10.10.10.105/text.txt

Once you do that, you will see Server responding with 404.

Refer below figure to understand the above output.

Now Go to Local Traffic | iRule | Create iRule | Name redirect_rule

Configure below iRule as shown in below figure and Update.

Here, the iRule says that if Client requested a web page and gets 404, then the F5 will redirect the traffic to pool2 configured.

Now Go to Local Traffic | Virtual Server | Create New Virtual Server Use Destination IP 10.10.10.106 and under Service Port, Select All Services.

Under iRule: Select redirect_rule, Select HTTP Profile http and default Pool: pool2


Comment

    You are will be the first.

LEAVE A COMMENT

Please login here to comment.