Home >Backend Development >PHP Tutorial >$_SERVER['HTTP_HOST'] 获取二级域名出现奇怪有关问题

$_SERVER['HTTP_HOST'] 获取二级域名出现奇怪有关问题

WBOY
WBOYOriginal
2016-06-13 11:29:211245browse

$_SERVER['HTTP_HOST'] 获取二级域名出现奇怪问题
使用:$_SERVER['HTTP_HOST']获取主机地址。
我有个网站A:www.nowphp.com
有个二级域名的:bbs.nowphp.com该域名下的帖子为bbs.nowphp.com/1001.html
问题来了:
百度搜索引擎有时候收录的却是www.nowphp.com/1001.html
我的网站区分中英文。
有时候发送消息的主机链接地址也会替换为www.nowphp.com/notify/101.html本来应该是bbs.nowphp.com/notify/101.html
不知道可否有人知道什么原因。

搜索引擎 百度
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn