Do you own both domains? If so, you could potentially use an HTTP redirect to force the client to make a request to xy.com after they make a request to x.com:
yes,I just found this ,for security reason,it is not allowed
yes,I own both domains.
all I want to do is ,let broswer or client cache cookie for xy.com when I visit x.com domain. and carry this cookie when hit xy.com(or whatever header which can act simliar as cookie)
2:set cookie for xy.com in its irule which applied to site2.xy.com,right?
3:would u kindly help me to understand session cookie,for example.when I hit 1.x.com ,cookie x.com is saved,if I hit 2.x.com,it is totally a different session
Sorry for not completing the thought. The HTTP::respond command would be used on the x.com virtual server to send a redirect to xy.com and set a cookie for x.com. You’d want to use a specific URI in the redirect and probably set a session ID in a parameter value:
On the xy.com virtual server you’d want to check for requests to /set_session and parse the sessionid parameter value. You could then set a cookie on the xy.com domain with the same value. You could then redirect the client back to the original x.com subdomain with the client then having two separate sessionid cookies set to the same value.
so in HTTP::request event,x.com irule redirect client to xy.com with cookie set for x.com ,then in xy.com irule HTTP::request event,it redirect it back to x.com with cookie set for xy.com.
once this is done,request with cookie set goes to normal process,right?