HTTPS redirect not changing the browsers URL

Hi All

I have a simple iRule to redirect traffic going from one domain to a new domain as per below;

when HTTP_REQUEST { if { [string tolower [HTTP::host]] contains “old.abc.com” } { HTTP::redirect “https://new.xyz.com/” } }

The rule works in that traffic is being directed to the new domain, however, the browser URL still shows the old URL and hence there is a certificate error. And yes, I have loaded the old.abc.com certificate on the f5. The certifcate being presented is for new.xyz.com.

How, can I get the redirect to display the new URI in the client browser?

Thank you in advance. rabv

It will solve problem.

when HTTP_REQUEST {
        if { [string tolower [HTTP::host]] equals "old.abc.com" } {
        HTTP::respond 301 Location "https://new.xyz.com/"
                }
            }

Hi Samir

Thank you for your solution but the browser still has https://old.abc.com/ as the URL.

the browser still has https://old.abc.com/ as the URL.

you may try http analyzer tool to check where the wrong is.

HttpFox

https://addons.mozilla.org/en-Us/firefox/addon/httpfox/