Forum Discussion
Heidi_35827
Nov 10, 2011Nimbostratus
We are not doing SSL termination for this site. Could that be part of the issue? I realize we will get a cert error when using the old address, but the redirect should still work right?
I tried 2 variations of the above iRules with the same results. Both times, my vserver for www.newsite.com quit responding. It would not load the site either by using www.newsite.com or by using www.oldsite.com. When I would put the address in the browser, it would spin and spin, never loading a page. As soon as I removed the profile and iRule, the www.newsite.com began working again.
I modified the 443 vserver for www.newsite.com, selected the default http profile for that vserver, and then applied my iRule to the vserver. Here are the 2 iRules I tried....
iRule 1:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "www.oldsite.com" } {
HTTP::respond 301 Location "https://www.newsite.com"
}
}
iRule 2:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "www.oldsite.com" } {
HTTP::redirect "https://www.newsite.com"
}
}