Forum Discussion
Born_7758
Jul 18, 2011Nimbostratus
Modify URI among other things
Hello Everyone, Here's what I am trying to do: I have a datagroup called payment_resp_1 When I receive a request I want to match it to the URIs in the datagroup, ...
hooleylist
Jul 18, 2011Cirrostratus
For 9.x you could create a string datagroup which has the following fields:
original_uri new_uri node_ip node_port
/PaymentResponse1.jsf /CSU/PaymentResponse.jsf 10.48.52.58 8080
You could use the findclass command to look up the requested URI against the datagroup. If you find a matching line using [lindex $line 0] to get the new URI, [lindex $line 1] to get the IP and [lindex $line 1] to get the port.
Here's an untested example:
when HTTP_REQUEST {
set line [findclass [HTTP::path] uri_class]
if {$line ne ""}{
HTTP::uri [lindex $line 0]
node [lindex $line 1] [lindex $line 2]
}
}
Aaron
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