Forum Discussion
hooleylist
Jun 29, 2009Cirrostratus
Sorry, bad copying and pasting on my part. I was also missing a closing square brace after HTTP::uri. You can remove the "to" in the middle. And actually, if you're on a version lower than 9.4.7, you should replace the curly braces with double quotes to avoid a bug (SOL7988 - Click here).
when HTTP_REQUEST {
Check if path ends with /searchresults.aspx
if {[string tolower [HTTP::path]] ends_with "/searchresults.aspx"}{
Rewrite URI for u=http:// to u=https://
HTTP::uri [string map -nocase "u=http:// u=https://" [HTTP::uri]]
log local0. "[IP::client_addr]:[TCP::client_port]: Updated query string to [HTTP::query]"
}
}
Aaron