Forum Discussion
MR_Freddy
Apr 05, 2017Nimbostratus
Summarize IRule using Switch command
I need to summarize the two below commands to different switch case ,, can you guide me ?
when HTTP_RESPONSE {
if { [HTTP::header exists Location] } { Here I would like to switch on IP (172.16.2.1:5050) to replace it to different IP (172.16.2.1) as I will have more IPs and I need to replace them to certain IPs HTTP::header replace Location [string map {"https:// 172.16.2.1:5050" "https:// 172.16.2.1"} [HTTP::header Location]] log local0. "[HTTP::header Location]" }if { [HTTP::header Content-Type] contains "text" } {
The same Here, I would like to use switch to different cases using the Stream
STREAM::expression {@ https://172.16.2.1:5050@https:// 172.16.2.1@}
STREAM::enable
}
}
No RepliesBe the first to reply
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