Forum Discussion
Emad
Cirrostratus
Jul 31, 2013Irule replace specific URI
I need replace a set if URI from my URL with single one.
e.g
I have these URLs which are being used now
www.123.com/app/cs/aaa,jsp
www.123.com/app/cs/bbb,jsp
www.123.co...
JAIME_QUIROGA_1
Nimbostratus
Jul 23, 2014I wrote the next irule:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/swscersalud" {
pool Pool_Consorcio_test set VARIABLE[string map -nocase {"/swscersalud/wscersalud.asmx" "/Services/Utility/certificacionSalud/WS/Implementation/Service.serviceagent/WSCERSALUDSoapEndpoint"} [HTTP::uri]] HTTP::uri $VARIABLE log local0. "Ingreso al swscersalud [HTTP::uri]" } "/wsconadmo" { log local0. "Ingreso al wsconadmo [HTTP::uri]" set VARIABLE[string map -nocase {"/Wsconadmo/OyS.asmx" "/Services/Utility/OyS/WS/Implementation/WSCONADMO.serviceagent/OySSoapEndpoint"} [HTTP::uri]] HTTP::uri $VARIABLE pool Pool_Consorcio_test_V2 } } }
when HTTP_REQUEST_SEND { switch [LB::server addr] { "10.237.146.1" { HTTP::header replace Host "vmpesbserver:14002" } "10.237.146.2" { HTTP::header replace Host "vmpesbserver2:14002" } }
}
Is this right?
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