Forum Discussion
plavender_72604
May 13, 2010Nimbostratus
Hi Aaron,
Many thanks for the response! So at the moment, what we are trying to do is rewrite from aaa.domain.com to domain.com/aaa. Once the rewrite has happened, we need the requests to stay with the /aaa or /bbb as the path, so I'm not too sure if I'd need to add your suggestion or not?
I've also just remembered, that we are using another iRule to change pools if there is less than 2 servers available:
when HTTP_REQUEST {
if { [active_members http_pool] >= 2 } {
pool primary_pool
} else {
pool alternate_pool
}
}
So I am guessing, the iRule would need to be configured as follows:
when HTTP_REQUEST {
Check host/uri (set to lowercase)
switch "[string tolower [HTTP::host]]" {
"aaa.domain.com" {
Rewrite host/URI
HTTP::header replace Host "domain.com"
HTTP::uri "/aaa"
if { [active_members http_pool] >= 2 } {
pool aaa_pool
} else {
pool aaa_alternate_pool
}
Thanks again!
Peter