Forum Discussion
Nat_Thirasuttakorn
Employee
Nov 22, 2004node command does not work with host name
I tested 9.0.1. and found that node command does not work with host name
any idea how to make it work? (with out creating pool)
for example:
if my_class = "somethi...
Nat_Thirasuttakorn
Employee
Mar 04, 2009can you try this one ? I hope you use irule editor.
when HTTP_REQUEST {
set uri [HTTP::uri]
set host [URI::host $uri]
set port [URI::port $uri]
set query [URI::query $uri]
set basename [URI::basename $uri]
if {[string bytelength $query] > 0} {
set query [format "?%s" $query]
}
if {[string bytelength $basename] > 0} {
set truncated [format "%s%s%s" [URI::path $uri] $basename $query ]
} else {
set truncated [format "%s%s" [URI::path $uri] $query]
}
if {[scan $host "%d.%d.%d.%d" a b c d] != 4} {
HTTP::uri $truncated
NAME::lookup $host
HTTP::collect
} else {
use node $host 80
}
}
when NAME_RESOLVED {
set address [NAME::response address 0]
use node $address 80
HTTP::release
}
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