Forum Discussion
astokes_6920
Nimbostratus
Nov 11, 2010Rewrite host header to specific pool member
I've done basic host header rewrites rules in the past but I've just received an odd request that's beyond me. I'm scrapping together a solution from multiple posts but haven't got anything to pass y...
astokes_6920
Nimbostratus
Nov 12, 2010Thanks. That's a really good start. Wireshark (on the serverside) shows the IP address:port in the header "Host: 10.200.32.80\r\n"
I created a data group, "tempneteng01", including only that address and am attempting to replace the host header by referencing the datagroup. I can't seem to get the syntax down correctly though.
when HTTP_REQUEST {
if { [HTTP::header host] eq "netengtest.ecollege.com") and ( [IP::addr "[IP::node_addr]" equals $::tempneteng01] } {
HTTP::header replace Host "netengtest.tempneteng01.ecollege.com"
}
}
The LTM throws me the following:
01070151:3: Rule [test-serverspecific-rewrite] error:
line 2: [parse error: PARSE syntax 78 {syntax error in expression " [HTTP::header host] eq
I think I'm on the right track. Though, using this logic, this iRule could grow extremely large considering we have over 70 possible nodes in some of our pools.
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