Prestashop 在数据库中更改后重定向到旧域

2023-10-11php开发问题
8

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

问题描述

我正在尝试为从 domain.com 到 dev.domain.com 的开发目的创建一份 prestashop 1.6 电子商店的副本

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. 将 mysql 数据库从 domain.com 转储到 dump.sql
  4. 在 vi 上打开 dump.sql 并使用 :%s/domain.com/dev.domain.com/g 进行搜索和替换
  5. 在devdb中导入dump.sql
  6. 打开 prestashop cpanel 并验证所有商店 url 配置都已更改.
  7. 打开 phpmyadmin 并检查所有 domain.com 条目是否已更改为 dev.domain.com
  8. 从/cache/smarty/compile/cache/cachefs 中删除的文件
  9. 从 prestashop 重建 .htaccess 文件.
  10. 更改了 devdb 中的登录凭据,以便网站加载该凭据

现在的问题是,当我打开 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 在数据库中更改后重定向到旧域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17