Forum Discussion
Kenny_Van_73892
Feb 12, 2009Nimbostratus
I did some searches on this forum but wonder if this would work or not
when HTTP_REQUEST {
strip away www. before BigIP check for SSL cert
if { [HTTP::host] starts_with "www." } {
HTTP::header replace "Host" [string range [HTTP::host] 4 end]
}
if { [TCP::local_port] equals 80} {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
if {$::debug}{log local0. "redirecting client [IP::client_addr] to https://[getfield [HTTP::host] \":\" 1][HTTP::uri]"}
} else {
Rewrite the HTTP::path to lower case if the option is enabled globally or in a separate rule
if {$::rewrite_uri_to_lower_case or ([info exists rewrite_uri_to_lower_case] and $rewrite_uri_to_lower_case)}{
HTTP::path [string tolower [HTTP::path]]
}
}
}
I have no way to test this since the site is in production.