Brian_Kinsey_10
Nov 15, 2007Nimbostratus
Redirect using part of origional URL
I would like to set up a rule that redirects a request such as to http://client1.company.com to http://www.company.com/client1
I know I can do it like this:
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "client1.company.com")
} {
HTTP::redirect "http://www.company.com/client1"
}
}
But there may be quite a few clients that I need to add to this rule. Is there a way to put whatever is before the .company.com in a variable and redirect to www.company.com/variable_value?