Forum Discussion
hooleylist
Feb 10, 2011Cirrostratus
I like nit-picking to get the most efficient solution :). I was being a dolt and thinking of another recent conversation where we needed the matched name and value for later logic. In this case, you just need the matched value, so something like this should work:
when HTTP_REQUEST {
set host [class search -value domainredirects equals [string tolower [HTTP::host]]]
if { $host ne "" } {
HTTP::redirect "https://$host[HTTP::uri]"
}
}
Aaron