Forum Discussion
Henrik_Gyllkran
Sep 25, 2017Nimbostratus
How about this:
when HTTP_REQUEST {
set sitepath [string tolower [HTTP::uri]]
if { $sitepath ne [HTTP::uri] }{
The lower case URI differs from HTTP::uri
i.e. the HTTP::uri contains upper case characters
HTTP::redirect $sitepath
} elseif {[HTTP::uri] starts_with "/" } {
HTTP::uri "/site/path$sitepath"
}
if { [HTTP::uri] ends_with "/" } {
HTTP::uri [string trimright [HTTP::uri] "/"]
}
}