Forum Discussion
dkraut_23236
Nimbostratus
Sep 02, 2008newbie needs irule help....
ok, I'm completely new to irules so break out the coloring book and crayons for me! lol.
I'm trying to create a rule that takes the incoming URI from the client and appends a numbe...
dkraut_23236
Nimbostratus
Sep 04, 2008Posted By pchang on 09/02/2008 8:00 PM
You can set up a normal pool and choose whatever load balancing method you want. The iRule would be something like this:
when LB_SELECTED {
use [LB::server addr] to figure out what server was selected so you can do your string replacement logic on the host name
HTTP::header replace "Host"
}
ok, after playing around, I don't think this will work. I need to add different replacement strings depending on which pool member the request will be sent to.
For example, if the LB is going to send the request to pool member 01 (servername01), I need it to change the host header to servername01. If it is going to send it to pool member 02, I need it to change the host header to servername02. If it is going to send it to pool member 03, I need it to change the host header to servername03. If it is going to send it to pool member 04, I need it to change the host header to servername04. Does that make sense?
Thanks!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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