通过浏览器中的IP访问我的新克隆站点时,将通过“301永久移动”转发回原始站点。如何防止新站点转发回旧站点?
历史:我们的专用Web服务器正在消亡,我正试图让我们的wordpress网站的工作克隆在它消亡之前在其他地方工作。我在这方面是新手,希望在我切换DNS之前,能够安全地看到它们在新的linode VM中运行。
我用Ubuntu服务器12.04、wordpress和;LAMP我将所有Web文件从专用服务器(DS)复制到虚拟机(VM)上,我在DS上运行了mysqldump,并在VM上重新安装了wordpress数据库,我确保了wpconfig中的DB\\u用户和DB\\u密码。php拥有DB的权限,我确保Apache虚拟主机文件(从DS复制的)具有新vm的IP然后转发开始,我研究并尝试了以下内容
我在wpconfig中添加了以下两项。php文件。我用IP和另一个名字试过了
定义(\'WP\\U SITEURL\',\'http://example.com "),
定义(\'WP\\u HOME\',\'http://example.com \')
我们明白了301 Moved Permanently 使用curl访问时
curl -v http://<ip>/
* About to connect() to <ip> port 80 (#0)
* Trying <ip>...
* Adding handle: conn: 0x7fb182003a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fb182003a00) send_pipe: 1, recv_pipe: 0
* Connected to <ip> (<ip>) port 80 (#0)
GET / HTTP/1.1
User-Agent: curl/7.30.0
Host: <ip>
Accept: */*
< HTTP/1.1 301 Moved Permanently
< Date: Thu, 27 Feb 2014 13:34:33 GMT
* Server Apache/2.2.22 (Ubuntu) is not blacklisted
< Server: Apache/2.2.22 (Ubuntu)
< X-Powered-By: PHP/5.3.10-1ubuntu3.9
< X-Pingback: http://<orginal_domain_name>.org/xmlrpc.php
< Location: http://<orginal_domain_name>.org/
< Vary: Accept-Encoding
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host <ip> left intact
如何防止新站点转发回旧站点?