Forum Discussion
William_Murphy1
Nimbostratus
Nov 17, 2006choosing pool based on port in HOST part of HTTP header
Hi,
newbie here again but attempting some of this stuff anyway.
Trying to write an irule where the pool is decided by what is in the HTTP Header(i.e. HOST: george.george.net:8002)
Th...
hoolio
Cirrostratus
Nov 17, 2006Is the rule working? It looks functionally correct. The only question I have is: is the field you're saving from the host header correct? Try logging the value you get for redirectport and checking the /var/log/ltm log file to verify it's what you expect.
when HTTP_REQUEST {
set redirectPort [getfield [HTTP::host] ":" 2]
log local0. "port: $redirectPort"
if { $redirectPort equals "8003" }{
pool 8003
}else if {$redirectPort equals "8004" }{
pool pool8004
} else {
pool pool8002
}
}
Aaron
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