在数据库中更改后,Prestashop重定向到旧域 [英] Prestashop redirects to old domain after changing it in Database

查看:76
本文介绍了在数据库中更改后,Prestashop重定向到旧域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于开发目的,我试图创建一个prestashop 1.6电子商店的副本,从domain.com到dev.domain.com

I am trying to create a copy of a prestashop 1.6 e-shop for development purposes from domain.com to dev.domain.com

我遵循的过程是

  1. 禁用缓存和编译
  2. 将文件从domain.com复制到dev.domain.com
  3. 在dump.sql中从domain.com转储mysql数据库
  4. 在vi上打开dump.sql并使用:%s/domain.com/dev.domain.com/g
  5. 搜索和替换
  6. 在devdb中导入dump.sql
  7. 打开prestashop cpanel并确认所有shop url配置均已更改.
  8. 打开phpmyadmin并检查所有domain.com条目均已更改为dev.domain.com
  9. 从/cache/smarty/compile/cache/cachefs删除的文件
  10. 从prestashop重建.htaccess文件.
  11. 更改了devdb中的登录凭据,以便网站加载该
  1. Disable cache and compilation
  2. Copy the files from domain.com to dev.domain.com
  3. Dump the mysql database from domain.com in dump.sql
  4. Open dump.sql on vi and search and replace using :%s/domain.com/dev.domain.com/g
  5. Import dump.sql in the devdb
  6. Open prestashop cpanel and verify all shop url configuration is changed.
  7. Open phpmyadmin and check that all domain.com entries have changed to dev.domain.com
  8. Deleted files from /cache/smarty/compile /cache/cachefs
  9. Rebuild .htaccess file from prestashop.
  10. Changed login credentials in the devdb so that the website will load that one

现在的问题是,当我打开dev.domain.com时,我仍然被重定向到domain.com,而接下来的尝试我却茫然无措.

Now the problem is that when I open dev.domain.com i still get redirected to domain.com and I'm at a loss as to what to try next.

在devdb中的phpmyadmin中搜索domain.com不会产生结果 grep -ri'domain.com'*在文件中也不会产生结果

Searching for domain.com in phpmyadmin in the devdb doesn't yield results grep -ri 'domain.com' * doesn't yield results either in the files

有什么建议我下一步可以尝试吗?

Any suggestions what I can try next?

PS:domain.com和dev.domain.com是两个不同的域.无论如何都不是

PS: domain.com and dev.domain.com are two different domains. Not similar in anyway

推荐答案

首先,以正确的方式执行每个步骤非常好.现在的问题是:-

First of all it's great that you follow each step in correct manner. Now the problem is:-

无论何时在浏览器上运行任何域.浏览器为此创建缓存和cookie.如果您更改域的任何设置,则在您没有完全清除浏览器缓存和Cookie之前,该设置不会反映出来.

When ever you are running any domain on your browser. Browser create cache and cookie for this. If you change any setting of your domain, it will not reflect till you not clear your browser cache and cookie completely.

因此,只需删除浏览器缓存和cookie,然后尝试检查其是否正常工作即可.

So just remove your browser cache and cookie and try to check is it working or not.

注意:-根据您执行的过程,似乎仅存在此问题.

Note:- Based on your process that you follow, this only problem seems to exist.

这篇关于在数据库中更改后,Prestashop重定向到旧域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆