JAIME_QUIROGA_1
Sep 08, 2014Nimbostratus
MODIFY URI WITH IRULE
Hi
I need to help me with an Irule that doesn't change the URI that client send.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/swscersalud*" {
pool Pool_Consorcio_test
HTTP::uri "/Services/Utility/certificacionSalud/WS/Implementation/Service.serviceagent/WSCERSALUDSoapEndpoint"
}
"/wsconadmo*" {
HTTP::uri "/Services/Utility/OyS/WS/Implementation/WSCONADMO.serviceagent/OySSoapEndpoint"
pool Pool_Consorcio_test_V2
}
"/wscomeps*" {
log local0. "Incio wscomeps[HTTP::uri]"
pool Pool_Consorcio_test_V3
HTTP::uri "/Services/Utility/siam/WS/Implementation/WSSIAM.serviceagent"
log local0. "Cambio wscomeps [HTTP::uri]"
}
"/wssispos*" {
log local0. "Incio wsispos [HTTP::uri]"
pool Pool_Consorcio_test_V4
HTTP::uri "/Services/Utility/serviciosAportes/WS/Implementation/WSSISPOS_ServiciosAportes.serviceagent"
log local0. "Modifico wsispos [HTTP::uri]"
}
}
}
when HTTP_REQUEST_SEND { switch [LB::server addr] { "10.237.146.1" { clientside { HTTP::header replace Host "vmpesbserver:14005" } } "10.237.146.2" { clientside { HTTP::header replace Host "vmpesbserver2:14005" } } }
}In adition i need that the Irule identify the server and modify the hostname, but if the client send "/swscersalud" the port is 14000, if the client send "/wsconadmo" the port is 14003, if the client send "/wscomeps" the port is 14004 and if the client send "/wssispos" the port is 14005.
The LTM has version 10.2.4