Rewrite URL (301) when matches a certain condition
I want to forward traffic from my old site to my new one. They are not in the same data center so this might make it a bit more challenging.
DNS is going to be updated so that "; will get sent to the IP address for ";, when the traffic gets there I want it to meet with my iRule to rewrite the URL.
Presently I have tried something like this: when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "abc.def.com" { HTTP::respond 301 Location "https://zyx.wvu.com[HTTP::uri]" } }
I need this configured in such a way so as to preserve any of the trailing arguments. So if there is a "/something/landingpage.aspx" after the ".com" it needs to remain there, but the domain needs to be updated so that the URL will match and not cause the certificate to blow up.
What I have above does not appear to work, though I have tried to narrow down the rule as much as possible.
Any ideas would be appreciated as I am very new to F5 configuration.