Forum Discussion
Chris_Day_10331
Nimbostratus
Dec 27, 2005iRules for Individual Testing of Farm Servers
Hello wonderful people at DevCentral!
I have a follow-up to an earlier post I had made “iRule for Server Testing” (http://devcentral.f5.com/default.aspx/Default.aspx?tabid=28&forumid=5&posti...
JRahm
Admin
Dec 28, 2005You might add some error checking to make sure the server provided in the URL is actually a server known by the big ip:
when HTTP_REQUEST {
if { [HTTP::uri] > 1 } {
set uri_index [ split [HTTP::uri] "/" ]
set myserver [ string trimleft [ lindex $uri_index 0 ] "/" ]
set myuri [ lindex $uri_index 1 ]
HTTP::uri "/$myuri" if { [catch { use node $myserver } ] } {
log "Invalid node $myserver - does not exist"
reject
return
} else { use node $myserver }
}
}
when HTTP_RESPONSE {
if { $myserver != "" } {
HTTP::uri "/$myserver[HTTP::uri]" }
}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