HTTP/HTTPS redirect

Hi,

Is it possible to redirect xyz.com (Public facing URL, hosted in our DC) to redirect to abc.com (hosted at client DC)? Currently we are running on LTM Version 11.6.0.

Any help would be really appreciate

Thank You

Are you wanting a 301 or 302 redirect ?

Hi,

You can use the following irule :

when HTTP_REQUEST {
    if { [HTTP::host] eq "xyz.com" } {
        HTTP::respond 302 Location "http://abc.com[HTTP::uri]" Connection Close
    }
}

You can also use LTM policies instead of irules. It does works for both irule and LTM policy if you have a Standard Virtual Server with http profile associated.

If you have an https website, you need to offload SSL on the Virtual Server by adding a clientssl profile.

Hi,

You can use the following irule :

when HTTP_REQUEST {
    if { [HTTP::host] eq "xyz.com" } {
        HTTP::respond 302 Location "http://abc.com[HTTP::uri]" Connection Close
    }
}

You can also use LTM policies instead of irules. It does works for both irule and LTM policy if you have a Standard Virtual Server with http profile associated.

If you have an https website, you need to offload SSL on the Virtual Server by adding a clientssl profile.

Thanks IainThomson85,

URL redirect will be a temporary.

Thank Yann,

Does this irule sill work if abc.com is on different network (Internet)?

Thank You

Thank Yann,

Does this irule sill work if abc.com is on different network (Internet)?

Thank You

it doesn’t matter where it is, it is just being send to the client as text, as long as the client can resolve it with DNS it will work.

it doesn’t matter where it is, it is just being send to the client as text, as long as the client can resolve it with DNS it will work.