Michael_Knowles
Sep 19, 2006Nimbostratus
iRule help -- URI Routing?
Hi all, I am new to the F5 load balancers and need some assistance setting up an iRule. We have 2 BIG-IP Kernel 4.5.14 Build5 in a load balanced environment.
(note: I orignally posted this in the wrong forum and I am attaching the reply I received. I am looking for a few different options to see what works or fits best.
I currently have a Citrix pool that load balances Web Interface on 2 servers. We also have a standard web pool that load balances port 80 traffic on 4 servers. I want to move the Citrix Web pages onto the 4 IIS boxes and have it load balanced. The issue I have is that the Citrix Web will not be the default web page and users would have to put the full path in the browser (http://vip name/citrix/metaframe). We obviously want to set this up so that users can still go to the vip name only and not know the whole path. We could do this with host headers on the IIS side but would like to use the F5 to handle this if possible.
As I understand it URI routing would look for the /citrix/metaframe and redirect the traffic to a pool, but I don’t believe that is what I need to do here? The user would have to type in the /citrix/metaframe which is what we don’t want. I can keep a separate vip and pool if necessary as long as the Citrix traffic is routed to the 4 IIS servers.
Thanks in advanced for any help.
Originally posted in the wrong Forum:
REPLY from Aaron
Posted:9/19/2006 9:33 AM Quote Reply
Hi,
To answer your question...
You could either redirect all requests made to the root document "/" to /citrix/metaframe/, or if all requested URIs should start with /citrix/metaframe/, you could redirect any request that doesn't start with /citrix/metaframe/ to /citrix/metaframe/.
Here are some examples to get you started:
Option 1:
if (http_uri equals "/") {
redirect to "http://%h/citrix/metaframe/"
}
else {
use (citrix_pool)
}
Option 2:
if (http_uri starts_with "/citrix/metaframe/") {
use (citrix_pool)
}
else {
redirect to "http://%h/citrix/metaframe/"
}
Note: I didn't check the syntax on this
Aaron