Forum Discussion
nramadan
Feb 26, 2024Nimbostratus
Dynamic Value iRule
Hi everyone, From past days, I have been struggling an iRule that forward dynamic string from 1st URL to 2nd URL. For example 1st URL = https://example.com/uat/data/value 2nd URL = http://192.168...
Feb 26, 2024
Try the iRule below.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "example.com" && [string tolower [HTTP::uri]] starts_with "/uat/data/" } {
set value [string map -nocase {"/uat/data/" "" } [HTTP::uri]]
HTTP::respond 302 noserver Location "http://192.168.1.1:8080/test/controller/ticket/ticket.jsp?data=$value"
}
}
See the output below.
Have fun,
--Niels
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