There is another minor tweak that you need to do:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to host [HTTP::host] and URI [HTTP::uri]"
if { [string tolower [HTTP::host]] equals ""xpro.xx.tt" } {
if { [string tolower [HTTP::uri]] ne "/teste/tt/rr" } {
HTTP::redirect http://xpro.xx.tt/teste/tt/rr
}
}
}
Change this: if { [string tolower [HTTP::host]] equals ""xpro.xx.tt" } {
To this: if { [string tolower [HTTP::host]] equals "/xpro.xx.tt" } {
I would still suggest using starts_with: if { [string tolower [HTTP::host]] starts_with "/xpro.xx.tt" } {
The [HTTP::uri] starts with a "/" so you have to include it. I believe that you must include it for "equals" and "starts_with", but not with "contains".