redirect from one domain to a sub-domain
So currently I have the need to get a redirect working for going from the root domain to a sub-domain. Current version of the F5 that I am working with is BIG-IP 11.2.1 Build 1306.0 Hotfix HF13.
https://sandboxcernercentral.com/audit-reports/admin is needing to be redirected to https://associates.sandboxcernercentral.com/sentinel
Here is the the iRule I have come up with but it is not working properly for me:
when HTTP_REQUEST {
if { [HTTP::host] eq "sandboxcernercentral.com" }{
if { [HTTP::uri] starts_with "/audit-reports/admin" }{
HTTP::redirect "https://associates.sandboxcernercentral.com/sentinel"
}
}
}
I try to do a curl to test out the redirect: curl -i https://sandboxcernercentral.com/audit-reports/admin
but it's getting a response of: curl: (56) SSLRead() return error -9806
I have a similar iRule setup for the root domain when just audit-reports is in the URI:
when HTTP_REQUEST {
if { [HTTP::host] eq "sandboxcernercentral.com" }{
if { [HTTP::uri] starts_with "/audit-reports" }{
HTTP::redirect https://sandboxcernercentral.com/sentinel/
}
}
}
It is working as expected and getting the following results from the curl:
curl -i https://sandboxcernercentral.com/audit-reports/
HTTP/1.0 302 Found
Location: https://sandboxcernercentral.com/sentinel/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
Not sure where to go from here as to why we are getting the SSLRead error.