Forum Discussion
nathe
May 15, 2012Cirrocumulus
Joe
Without my test bed to double check things do look correct. Here's my iRule with a slight amendment to rule out case insensitivities:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
set uri [HTTP::uri]
if { (([HTTP::host] equals "Server1") or ([HTTP::host] equals "Server2")) and
($uri starts_with "/ThisURI") } {
HTTP::header replace Host "FinalDestination"
HTTP::uri "/new[string range $uri 8 end]"
}
}
}
What happens if you do a curl -i http://Server1/ThisURI/end-up-here.htm -what response do you get back?
N