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.com
CNAME
123.xx.com
And possibly CNAME
345.xx.com
,
The server receives
www.blog.com/1
The server can obtain the domain name.
345.xx.com
Or
123.xx.com
?
$ Origin does not exist? How can I get $ origin if it exists? Thank you.
Reply content:Domain Namewww.blog.com
CNAME123.xx.com
And possibly CNAME345.xx.com
,
The server receiveswww.blog.com/1
The server can obtain the domain name.345.xx.com
Or123.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.