Forum Discussion
DaveC_21078
Altostratus
Feb 07, 2011Change 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.
hoolio
Cirrostratus
Feb 08, 2011I think the offset for the string range needs to be 4 instead of 3 as /ssl is 4 characters. Can you try testing with some additional logging?
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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