Luca_55898
Jun 27, 2011Nimbostratus
Redirect to TCP port based on URL
Hello,
We have an Alteon load balancer that will be replaced with an LTM very soon.
We have a pool of two servers which run a bunch of different websites. The sites all use the same domain name, but just load different pages such as,
www.website.com/employees
www.website.com/customers
www.website.com/new_users
The servers run on an Apache host which knows what page to loaded based upon the TCP port people come in on. Currently the Alteon redirects incomming traffic to use either port 80,81 or 82 depending on which URL is entered into a browser.
So, can i create an iRule which will look at the incoming URL, then redirect traffic to the pool on either TCP 80,81, or 82?
I'm very new to iRules so if someone could point me in the right direction that would be good.
I know i could create a VIP for each site, but there are more than three and each requires HTTP and HTTPS so we would need a lot of VIPs. I'd also like to get my hands dirty with iRules.
So i know how to get started, just not how to redirect to a port.
when HTTP_REQUEST {
if {[HTTP::uri] equals {www.site1.com/test}} {HTTP::uri {www.site.com/test:81}
}
}
thoughts?