Colin,Thanks! That sounds like what I want to do excatly. However I do have one follow up question. We host a lot of sites and I'm using an irule format that I'm not sure how I could incorporate your syntax into the current rulle. Below is an example of the rule we have in place..
when HTTP_REQUEST {
switch "[string tolower [HTTP::host]]" {
"domain1.com" -
www.domain1.com {
HTTP::respond 301 Location http://domainName.com
}
"domain2.com" -
www.domain2.com {
HTTP::respond 301 Location https://domain2.com
}
www.domain.com {
HTTP::respond 301 Location "http://domain.com/"
}
"domain3.com" {
HTTP::respond 301 Location "https://domain3.com/"
}
"domain4.com" {
if {[string tolower [HTTP::uri]] eq "/aer/"}{
HTTP::respond 301 Location "http://domain4.com/artsdirectory.aspx"
}
ETC.. ETC.. ETC..
I'm not sure how I would add that into the rule if the host I want to apply this to is say the 3rd one down. Any thoughts?v