Forum Discussion
Thanks nitass - I just did the same in 10.0.1 with the same results... :/
There was another iRule bound to the VS with the following statement:
if { [HTTP::uri] starts_with "/o" } {
HTTP::header replace Host "oldhost.company.com"
set ::SelectedPool "old_pool"
}
This was also being matched for oldhost/olduri1. Shouldn't have mattered... the redirect worked for the HTTP virtual but not HTTPS.
Anyway I ended up integrating both rules, and nesting the old iRule as an else clause within a new iRule... so the header replacement and pool selection statement would never trigger if the redirect was hit.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/olduri1"} {
HTTP::respond 301 Location "https://newhost/newuri1"
} elseif {[HTTP::uri] starts_with "/olduri2"} {
HTTP::respond 301 Location " https://newhost/newuri2"
} else {
if { [HTTP::uri] starts_with "/o" } {
HTTP::header replace Host "oldhost.company.com" set ::SelectedPool "old_pool"
}
}
}
Thanks for your help, sometimes all it takes is a simple test!