You forgot the preformatted code again. 🙂
Skip the curly braces and you should be good to go. Apparently they prevent the use of variables.
when CLIENT_ACCEPTED { '
set hsl [HSL::open -proto UDP -pool graylog2-syslog-pool]
}
when HTTP_REQUEST {
HSL::send $hsl "This is the HTTP URI [HTTP::uri]"
HSL::send $hsl "This is the HTTP Path [HTTP::path]"
set directory [lindex [split [HTTP::uri] "/"] 1]
set uri [string map -nocase "/$directory/ /" [HTTP::uri] ]
HSL::send $hsl "This is the new uri $uri"
HTTP::redirect "http://$directory.domain.com$uri"
when this works I will append the new uri to the redirect
}
/Patrik