Forum Discussion
jirish5563_3502
Nimbostratus
I was able to figure out part of the issue. The reason the iRule was not working was caused by the SSL Certificate. One site would have to redirect to the other and then the 301 can rewrite the URL. Because both of the Certs don't live on the F5 that was at least part of the issue.
The Rule that I setup, and is working, looks like this:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "abc.def.com"}
{
HTTP::redirect "https://zyx.wuv.com[HTTP::uri]"
}
}
Hannes_Rapp
Jan 31, 2018Nimbostratus
Sweet. FYI,
HTTP:redirect
function only does 302 redirects. For 301, you must use HTTP::respond 301 Location "foo"