f5_user_7996
Aug 08, 2012Nimbostratus
redirection loop
Hi all,
Anybody could help me on this scenario
A customer wants to redirect their website with 301 response with the following scenarios.
1) customer.co.nz -> http://www.customer.co.nz/Pages/default.aspx
2) www.customer.co.nz -> http://www.customer.co.nz/Pages/default.aspx
I was able to sort the first one with this irule:
when HTTP_REQUEST {
if { [string tolower [HTTP::]] equals "customer.co.nz" } {
HTTP::respond 301 location http://www.customer.co.nz/Pages/Default.aspx
}
}
But on the second one when I apply the rule below it says on my browser "redirection loop"
when HTTP_REQUEST {
if { [string tolower [HTTP::]] equals "www.customer.co.nz" } {
HTTP::respond 301 location http://www.customer.co.nz/Pages/default.aspx"
}
}
I'm not sure what's wrong with the second rule, they are separate irule and both mounted on one virtual server.
Thanks.