DaveC_21078
Feb 07, 2011Altostratus
Change path
I have a URL where I need to alter the path, to eliminate the SSL in or w/o caring what comes afterSSL/. I thought it would fairly simple, but I can't get it to work. Thanks.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [virtual name]\
[IP::local_addr]:[TCP::local_port] [HTTP::host][HTTP::uri]"
set uri [tolower [HTTP::uri]]
if { $uri starts_with "/ssl/" } {
log local0. "[IP::client_addr]:[TCP::client_port]: URI starts with /ssl/,\
updating URI to [string range [HTTP::uri] [expr {[string first /ssl/ $uri] + 4}] end]"
HTTP::uri [string range [HTTP::uri] [expr {[string first /ssl/ $uri] + 4}] end]
}
}
Aaron
Aaron