Forum Discussion
yihwen_100254
Jul 30, 2012Nimbostratus
Posted By Joe on 02/10/2011 01:44 PM
if you always know that you want to move domainA.com to domainB.com, you could do something more generic like this
when HTTP_REQUEST {
if { [HTTP::host] ends_with "domainA.com" } {
HTTP::redirect "https://[getfield [HTTP::host] "." 1].domainB.com[HTTP::uri]"
}
}
That would redirect all requests to XXX.domainA.com to XXX.domainB.com retaining the URIs.
Of course, if you have more domains to match on, then the class lookup will likely be a better solution.
-Joe
Hi Joe
Your suggestion looks good. Does your iRule works the same if we are redirecting from .com to say .com.sg?