H_Sang_39134
Jun 11, 2014Nimbostratus
iRule to detect url and forward port.
Hi, my main iRule use events HTTP_REQUEST with switch style to detect [HTTP::path] then send to each pool it work properly below is work flow front https://domain.com/path/ (443) => mid f5 ssl terminate detect [HTTP::path] then sent to iis pool (80)
but my problem is I need to use this iRule for application socket with specify port but when send request to socket pool it not work below is flow front https://domain.com/path/ (443) => mid f5 ssl terminate detect [HTTP::path] then sent to socket application pool (5001)
This is my iRule sample
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/fristpath/_" {
pool fristpool
}
"/secpath/_" {
pool secpool
}
"/socket01/*" {
pool socket01
} } }
pool socket01 monitor with TCP node specify port 192.168.51.10:5001 (windows application socket program)
I try to use
"/socket01/*" {
pool socket01 member 192.168.51.10 5001
}
But seem not work Please help to suggest me how to solve this request thank somuch.