[英]Magento site copy redirecting to old domain despite all factors I could possibly find
Just a day ago my staging copy of our production website was working perfectly. 就在前一天,我的生产网站的临时副本完美运行。 I see no connection with anything that happened since then that could cause this. 我认为从那以后发生的任何事都没有任何联系可能导致这种情况。
http://www.domain.co.uk/
直播网站: http://www.domain.co.uk/
: http://www.domain.co.uk/
http://devdomain.com/stage/site/
舞台网站: http://devdomain.com/stage/site/
: http://devdomain.com/stage/site/
Both of these domains are on the same server, each a separate Magento installation with only one store. 这两个域都位于同一台服务器上,每个域都是一个单独的Magento安装,只有一个商店。 Database was dumped from live using mage-dbdump.sh of Sonassi. 使用Sonassi的mage-dbdump.sh从实时转储数据库。
At first I noticed the site completely redirects to our live site no matter what URL. 起初我注意到无论使用什么URL,该网站都会完全重定向到我们的实时网站。 After fixing a few things I noticed I can then run any PHP file other than the index.php of Magento, which always does a 302 redirect to live site according to Firebug Net tab. 在修完了一些事情之后,我注意到我可以运行除Magento的index.php以外的任何PHP文件,根据Firebug Net选项卡,它总是进行302重定向到实时站点。 (First header is for stage/site 302 Found, second one is live site 200 OK) (第一个标题是用于舞台/网站302发现,第二个是现场网站200 OK)
Several more fixing attempts later and it redirects to live site no matter what without even saying in the Firebug Net tab that it redirected. 稍后再进行几次修复尝试,无论什么甚至没有在Firebug Net选项卡中重定向,它都会重定向到实时网站。
Here is the list of things I have done trying to fix it (might have forgotten some by now): 以下是我尝试修复它的事情列表(可能现在已经忘记了一些):
chown
on the entire devdomain to ensure everything works as it should 在整个devdomain上使用chown
来确保一切正常工作 chmod 755
on all directories and chmod 644
on all files and chmod 550
on the "mage" file 在所有目录上使用chmod 755
,在所有文件上使用chmod 644
,在“mage”文件上使用chmod 550
http://devdomain.com/stage/magento/
and using the same .htaccess as the stage site (replacing all occurrences of "/stage/site/" with "/stage/magento/"). 安装新的Magento网站并以与舞台网站相同的方式进行配置,但在http://devdomain.com/stage/magento/
使用与舞台网站相同的.htaccess(替换所有出现的“/ stage / site”) /“with”/ stage / magento /“)。 This worked fine. 这很好。 Please tell me what I could have possibly missed. 请告诉我可能错过的内容。
Chrome caches redirects: Chrome缓存重定向:
https://superuser.com/questions/304589/how-can-i-make-chrome-stop-caching-redirects https://superuser.com/questions/304589/how-can-i-make-chrome-stop-caching-redirects
(even though you said you cleared the cache.) (即使你说你清除了缓存。)
You can also change the base URL on fresh installation to point to the old staging URL, after moving your old staging app to another directory, and verify if the redirection still happens. 在将旧的临时应用程序移动到另一个目录之后,您还可以在全新安装时更改基本URL以指向旧的临时URL,并验证重定向是否仍然发生。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.