when HTTP_REQUEST {
set query ""
if { [URI::query [HTTP::uri] _cid] ne "" } {
set query "?_cid=[URI::query [HTTP::uri] _cid]"
}
HTTP::redirect "http://www.site.com/training/index.htm${query}"
}
Or maybe something like this example? This assumes that mytraining.site.com and www.site.com resolve to the same virtual server IP address.
when HTTP_REQUEST {
if {[HTTP::uri] contains "_cid=" and not ([HTTP::path] starts_with "/training/index.htm"}{
HTTP::redirect "http://www.site.com/training/index.htm?_cid=[URI::query [HTTP::uri] _cid]"
}
}