Forum Discussion
Jim_Grundy_4363
Nimbostratus
Aug 15, 2009append to a URI string
I don't know TCL very well, but I have been asked to write an iRule for internet only traffic. The rule must append to the end of the URI for internet traffic only. Internal access should not have th...
The_Bhattman
Nimbostratus
Aug 16, 2009Hi Jim
I am going to make an assumption that internal address uses non-public private blocks. Thus, the logic will be if you are a not a private block then append the traffic.
when HTTP_REQUEST {
if { !([IP::addr [IP::client_addr] equals 10.10.0.0/255.255.0.0]) } {
HTTP::uri /appenduri[HTTP::uri]
}
}
Or you can add logic where it checks to see if you are not a private block or haven't already appended the traffic
when HTTP_REQUEST {
if { !([IP::addr [IP::client_addr] equals 10.10.0.0/255.255.0.0]) and !(HTTP::uri "/appendeduri" } {
HTTP::uri /appenduri[HTTP::uri]
}
}
Hope this helps
CB
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
