Forum Discussion
yo-digitales
Sep 26, 2019Nimbostratus
irule + regex
Hi All, New to F5 and irules in general. We have a situation where we need to grab a portion of the HTTP Post that come into the BIGIP, Look for string, and send a manipulated HTTP Post t...
Sep 26, 2019
Hi yo-digitales,
I hope these codes will help you.
when HTTP_REQUEST {
log local0. "old-host = [HTTP::host]"
log local0. "old-path = [HTTP::path]"
set pathfirstdir [getfield [HTTP::path] "/" 2]
log local0. "path-first-dir = $pathfirstdir"
set newpath [string map -nocase [list /$pathfirstdir ""] [HTTP::path]]
log local0. "new-path = $newpath"
set newhost "$pathfirstdir.[HTTP::host]"
log local0. "new-host = $newhost"
set newaddress "https://$newhost$newpath"
log local0. "new-address = $newaddress"
}
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