Forum Discussion
JimB_43720
Nimbostratus
14 years agoChange destination port based on hostheader
I wondered if I could use an irule to change the destination port of a standard http request based purely on the hostheader?
The current setup is as follows:
We are using BIG IP ...
hoolio
Cirrostratus
14 years agoA closing brace was just on the wrong line. You could also dynamically get the VS default pool name rather than hard coding it in the iRule:
when CLIENT_ACCEPTED {
Save the name of the VS default pool before it's modified in this iRule
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
www.foo.com { pool port_81_servers }
www.bar.com { pool port_82_servers }
default { pool $default_pool }
}
}
Aaron