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...
Jim_Grundy_4363
Nimbostratus
Aug 25, 2009This sort of works, but not exactly. I think I need to redirect the browser to get it work with the variable.
This is what I have so far.
when HTTP_REQUEST {
if { !([IP::addr [IP::client_addr] equals 10.0.0.0/255.0.0.0]) and !([IP::addr [IP::client_addr] equals 172.16.0.0/255.240.0.0]) } {
HTTP::uri /[HTTP::uri]"&ra=0"
set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
log local0. "============================================="
log local0. "$LogString (request)"
foreach aHeader [HTTP::header names] {
log local0. "$aHeader: [HTTP::header value $aHeader]"
}
log local0. "============================================="
}
else {
HTTP::uri /[HTTP::uri]
}
}
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
