Forum Discussion

mbohre_59527's avatar
mbohre_59527
Icon for Nimbostratus rankNimbostratus
Mar 01, 2010

Need help to Redirect the hard coded URL

Hello,

 

 

I am new to F5 iRule. We currently have VIP 10.10.10.11 bind to Rule_1

 

 

Rule_1 sends the request to appropriate pool based on Client Subnet

 

 

Here is the content of Rule_1

 

 

if (client_addr == 10.10.210.0 netmask 255.255.255.0 or client_addr == 10.10.17.0 netmask 255.255.255.0) {

 

use ( Pool3 )

 

}

 

else {

 

use ( Pool1 )

 

}

 

 

Currently all our users type the absolute URL http://10.10.10.11/forms/forms?Config=tst

 

 

Within few weeks we are planning to deploy new application that will change the above URL to http://10.10.10.11/forms90/formss?Config=csp

 

 

Now the challenge is while keeping the functionality of the Rule_1, we would like to add redirection so that users who used to access URL http://10.10.10.11/forms/forms?Config=tst will automatically redirect to URL to http://10.10.10.11/forms90/formss?Config=csp.

 

 

The URL http://10.10.10.11/forms/forms?Config=tst is hard coded on more than 500 workstations. So, the solution is to change the URL via script on all workstations or asked user to type a new URL. Both of these are painful and time consuming process. However, this can be accomplish easily using iRule. Please let us know how we can accomplish our goal with minimum efforts.

 

 

We just want add redirection to the existing Rule_1. Your help will be greatly appreciated.

 

 

Thanks,

 

 

  • Hi Mbohre,

     

    I believe you can perform redirects in v4.x code by using the following commands

     

     

    redirect to "https://%h/%u"

     

     

    You can find references to this on ask.f5.com (Click here)

     

     

    I hope this helps

     

     

    Bhattman