JB_41040
Feb 12, 2016Nimbostratus
trying to redirect one https url to another
We have SSL cert for one domain1 but not for domain2. Our links are all relative and a link works just fine. However generates a SSL cert error as expected.
In order to get around that without having to hard code the contactus links on domain2 to domain1, i am trying to write an iRule. I tried the one below but the page still gives me the SSL cert error and then redirects to domain1 instead. Any ideas?
when HTTP_REQUEST {
if { ([HTTP::host] contains "domain2") and (([HTTP::uri] contains "view=contactus") or ([HTTP::uri] contains "view=emailto"))
}
{ HTTP::respond 301 Location "https://domain1[HTTP::uri]"
}
}