Ben_Conrad_8684
Nov 03, 2009Nimbostratus
iRule Help/HTTP:respond assistance
Hello,
I was wondering if someone could give me a hand with an iRule. I am trying to redirect all test.website.com traffic to test.website2.com EXCEPT traffic going to test.website.com/Three (I don't want traffic going to test.website2.com/Three). Can anyone tell me what I am doing wrong? I have attached my iRule as a reference.
when HTTP_REQUEST {
if { [HTTP::host] equals "test.website.com"} {
HTTP::respond 301 Location http://test.website2.com[HTTP::uri]
}
elseif { [HTTP::host] equals "test.website.com" and [HTTP::uri] equals "/One/Two/" } {
HTTP::respond 301 Location http://test.website2.com/One/Two
}
elseif { [HTTP::host] equals "test.website.com" and [HTTP::uri] equals "/Three/" } {
HTTP::respond 301 Location http://test.website.com/Three
}
Thanks in advance