I have a scenario where I need to perform a header replace and url rewrite and select a pool.
I have several sites that I need to select a specific pool and they all have to come through the same
virtual server.
When I select a pool the content returned is not complete. The web page is missing formatting and content.
If I define a default pool that would be used for the specific site the content returned is complete for that site
but still missing content for the other sites not using a default pool.
I have tried a /32 oneconnet profile and that made no difference.
Below is my irule
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
“mywebsite.test.edu” {
switch -glob [string tolower [HTTP::uri]] {
“/mytestsite1” { HTTP::redirect “https://mywebsite.test.edu/mytestsite1/Authentication/Login?” }
“/mytestsite1/*” {if {[HTTP::host] ne “”} {
HTTP::header replace Host “differentname.test.edu”
HTTP::uri [string map -nocase {“/mytestsite1/” “/differentname1/”} [HTTP::uri]] }
pool mypool1
return
}
“/mytestsite2” { HTTP::redirect “https://mywebsite.test.edu/mytestsite2/Authentication/Login?” }
“/mytestsite2/*” { if {[HTTP::host] ne “”} {
HTTP::header replace Host “differentname.test.edu”
HTTP::uri [string map -nocase {“/mytestsite2/” “/differentname2/”} [HTTP::uri]] }
pool mypool2
return
}
“/mytestsite3” { HTTP::redirect “https://mywebsite.test.edu/mytestsite3/Authentication/Login?” }
“/mytestsite3/*” { if {[HTTP::host] ne “”} {
HTTP::header replace Host “differentname.test.edu”
HTTP::uri [string map -nocase {“/mytestsite3/” “/differentname3/”} [HTTP::uri]] }
pool mypool3
return
}
}
}
}
}
