移植magento网站后未显示产品图片 [英] Product images not showing after migration of magento website

查看:186
本文介绍了移植magento网站后未显示产品图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的magento网站迁移到了另一台服务器,这是我使用的过程:

I recently migrated my magento website to a different server, and here's the process I used:


  1. 转储了数据库。

  2. 将所有系统文件从FTP复制到我的硬盘。

  3. 清空VAR文件夹

  4. 清空媒体缓存文件夹

  5. http://替换SQL转储中的字符串www.oldsite.com http://www.newsite.com

  6. 恢复新服务器上的数据库

  7. 修改了local.xml文件以适应新的数据库主机,登录名和密码。

  8. 将系统文件上传到新服务器

  1. made a dump of the database.
  2. copied all the system files from the FTP to my hard drive.
  3. emptied the VAR folder
  4. emptied the media cache folders
  5. replaced the strings in the SQL dump from http://www.oldsite.com to http://www.newsite.com
  6. restored the database on the new server
  7. modified the local.xml file to suit the new database host, login and password.
  8. uploaded the system files to the new server

除了产品图片不存在这一事实外,一切似乎都运行正常由于某种原因显示在前端。

Everything seems to work fine, except for the fact that the product images are not being displayed on the frontend for some reason.

例如,这是一张应该是showi的图像的路径ng,我通过firebug得到的:

For example, here's a path from an image that was supposed to be showing, which I got through firebug:

http://www.newsite.com/media/catalog/product/cache/1/small_image/113x113/9df78eab33525d08d6e5fb8d27136e95/1/_/1_9 .jpg

当我搜索网站应该在FTP中显示的图像路径时,文件实际上就在那里。我可以下载它并将其显示在我的电脑上。我不知道为什么会这样。这对我没有任何意义。

When I search for the path of the image the site is supposed to show in the FTP, the file is actually there. I can download it and display it on my computer. I don't know why this is happening. It doesn't make any sense to me.

生成了 / media / catalog / product / cache / 由系统,因为我在上传网站之前自己删除它,所以我想这不是缓存相关的问题。

This /media/catalog/product/cache/ was generated by the system, because I erased it myself before uploading the site, so I guess it isn't a cache related issue.

嗯,我描述的问题最好我可以。我希望你能帮助我。

Well, I described the issue the best I could. I hope you can help me out.

编辑:

嗯,事实证明问题是<$媒体文件夹中的c $ c> .htaccess 文件!删除了文件 - >问题解决了!


Hmm, it turns out the problem was the .htaccess file inside the media folder! Removed the file -> Problem solved!

推荐答案

以防其他人遇到同样的问题,删除媒体中的.htaccess文件夹成功了。我不知道这是否是最好的解决方案!谢谢!

Just in case anyone else has the same problem, removing the .htaccess in the media folder did the trick. I don't know if that's the best possible solution though! Thanks!

这篇关于移植magento网站后未显示产品图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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