Forum Discussion
hooleylist
Jul 23, 2009Cirrostratus
Hi Heiko,
I think you want to rewrite the host and/or URI not redirect the client to a new location. Here is an example to get you started:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"keyaccount.company.com" {
Rewrite / to /path/path/index.html
if {[HTTP::path] eq "/"}{
HTTP::uri "/path/path/index.html"
}
Rewrite host header to keyaccount.othercompany.com
HTTP::header replace Host "keyaccount.othercompany.com"
Use pool1
pool pool1
}
"keyaccount.company.com" {
Rewrite / to /path/path/index.html
if {[HTTP::path] eq "/"}{
HTTP::uri "/path/path/index.html"
}
Rewrite host header to keyaccount.othercompany.com
HTTP::header replace Host "keyaccount.othercompany.com"
Use pool1
pool pool1
}
default {
Take some default action for other host header values?
}
}
}
Aaron