The domain name www. blog. comCNAME to 123.xx.com can also be CNAME to 345.xx.com. The server receives the www. blog. com1 request, can the server get the domain name 345.xx.com or 123.xx.com? {Code...} does not exist $ origin? How can I get the $ origi... domain name if it exists?
www.blog.comCNAME
123.xx.comAnd possibly CNAME
345.xx.com,
The server receives
www.blog.com/1The server can obtain the domain name.
345.xx.comOr
123.xx.com?
$ Origin does not exist? How can I get $ origin if it exists? Thank you.
Reply content:
Domain Namewww.blog.comCNAME123.xx.comAnd possibly CNAME345.xx.com,
The server receiveswww.blog.com/1The server can obtain the domain name.345.xx.comOr123.xx.com?
$ Origin does not exist? How can I get $ origin if it exists? Thank you.
Yes. Target Domain Name for Server Resolution (www.blog.com).www.xx.com.
array(5) { ["host"]=> string(16) "www.a.shifen.com" ["class"]=> string(2) "IN" ["ttl"]=> int(267) ["type"]=> string(1) "A" ["ip"]=> string(14) "61.135.169.105" } [1]=> array(5) { ["host"]=> string(16) "www.a.shifen.com" ["class"]=> string(2) "IN" ["ttl"]=> int(267) ["type"]=> string(1) "A" ["ip"]=> string(14) "61.135.169.125" }}
You cannot directly obtain the CNAME domain name on the server. Because CNAME resolution is completed in the DNS resolution step, the server only receives the request host, on the server side, I am afraid it cannot be processed directly based on the CNAME domain name;
If you want to obtain the DNS record, you can use the functions in the corresponding language to send the request.