本文由HosteGuide 原创,如需转载,请注明出处及本文原始链接。
http://cn.hosteguide.com/html/classroom/jingyan/parked-some-domain-to-addon-domain-203.html
最近,有网友问在 hostmonster lunarpages 等使用cpanel的主机上,怎样实现这样的多个域名访问同样网站内容的绑定需求:
网站的主域名假设是 hosteguide.com ,通过cpanel后台的addon domain功能新加入了一个域名 hothosting.info,那么在hostmonster或 lunarpages的主机上目录结构是这样的:
/-----根目录 (网站 hosteguide.com)
/hothosting/ (网站 hothosting.info)
现在需要再新绑定一个域名 domain3.com 到 hothosting.info 上,即不管访问 domain3.com 还是 hothosting.info 看到的都是同样的内容。
开始的时候,使用cpanel 后台的parked domain功能加入domain3.com。然后做完domain3.com 的DNS解析后发现当访问 domain3.com 时出现的不是hothosting.info的页面,而是 hosteguide.com的页面。
经过研究,正确的做法应该是在加入domain3.com到服务器上时不是用parked domain功能,而是用addon domain 功能,但把add domain的目录指向 /hothosting ,这样,不论访问domain3.com 还是访问hothosting.info,看到的都是同样的内容了。
本方法适用于 hostmonster lunarpages 等所有适用Cpanel系统,并提供多个 Addon domain和 parked domain 的主机。









