Forum Discussion
Michael_Knowles
Nimbostratus
Sep 19, 2006iRule 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
- Michael_Knowles
Nimbostratus
Does anyone know if a basic redirect could be done here? For example, something along the lines of if http url = http://citrixvipname redirect to http://citrixvipname/citrix/metaframe ? - hoolio
Cirrostratus
If you just want to redirect all requests made to the root document to /citrix/metaframe/ then you can use option 1 above. If you want to redirect all requests that don't start with /citrix/metaframe/ to /citrix/metaframe/ you can use option 2. - Michael_Knowles
Nimbostratus
Thanks again for the help. One thing that I am confused about on option 2: - hoolio
Cirrostratus
Some background: - Michael_Knowles
Nimbostratus
Thanks for the clarification. I will test this in the lab and let you know how it goes. - Michael_Knowles
Nimbostratus
I tested option 1 and it works great. Thanks for the help.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects