我有两个域在GoDaddy注册:
domaina.com (not hosted, only domain name is registered to GD)
domainb.com (hosted at a different webhost, domain name registered to GD)domainb.com是一个已经在运行的站点,拥有不同的网站主机,但域名已注册到GoDaddy (我假设名称服务器被更改为重定向到with主机)。
现在,我不明白为什么要这样做,但是domainb.com被认为是主机上的子域.意味着文件位于服务器上的一个单独的文件夹中。
例:public-html/domainb.com/public-html/FILES
该结构与The主机上的结构类似:
HostNAME (main root folder)
domainb.com (subdomain of hostname)
domainc.com (etc...)
domaind.com (etc...)我想转移的网站domainb.com到domaina.com,意味着domaina.com将成为新的网站,而不必重新上传所有的内容和CMS。传输完成后,旧的重定向将重定向到domaina.com (使用301重定向)。
有人能告诉我怎么做吗?
发布于 2012-12-04 16:38:04
假设您可以访问web服务器配置(例如httpd.conf ),您可以只编辑现有的domaina.com VirtualHost,或者使用domainb.com目录作为其根目录创建一个新的VirtualHost。因此,如果domainb.com文件的绝对路径是/var/www/public-html/domainb.com/public-html,并且希望将其作为domaina.com托管:
<VirtualHost 10.1.2.3:80>
ServerAdmin webmaster@domaina.com
DocumentRoot /var/www/public-html/domainb.com/public-html
ServerName www.domaina.com
ErrorLog logs/domaina.com-error_log
TransferLog logs/domaina.com-access_log
</VirtualHost>发布于 2013-02-05 09:10:28
如果您正在使用Cpanel,只需使用选项,您的旧域将被更改为新的one.Thus,旧域将从服务器中删除,文件将保持不变。
在此之后,您只需检查db连接,并检查脚本的路径(因为它们可能由于域的更改而发生更改)。
https://webmasters.stackexchange.com/questions/38548
复制相似问题