hi i have the same issue, i tried the same but when user types lower case redirection works but when users types uppers it is not working..
eg user come /bseu/finance it should redirect to /sites/finance this is working..now if user comes with /bseu/FINANCE it is not redirecting to sites.
if { [class match [string tolower [HTTP::path]] starts_with test] } {
set origin [class match -name [string tolower [HTTP::path]] starts_with test]
set new [class match -value [string tolower [HTTP::path]] starts_with test]
HTTP::uri [string map "$origin $new" [HTTP::uri]]
log local0. "New URI = $new" }