我复制了&为客户端安装了Magento站点的数据库。我在Magento没有太多经验,但我得到一个奇怪的错误条件
当您在www.example.com中输入内容时,它会自动将网址重新写入www.example.com/sites/example.com/index.php
它也会产生500错误。
任何人都知道如何解决这个问题?请记住我是Magento的新手。
修改 问题出在服务器设置上:(“webroot”存在问题
答案 0 :(得分:0)
转到core_config_data table. There are a couple of fields you need to edit so the urls match your http://localhost/mysite/
但请确保您在网站路径上有斜杠。
基本网址
修改这些基本网址
这些告诉数据库将页面与内容之间的链接指向何处。
moving files and database
I assume these two steps are obvious:
copy all of your local files to production server
dump your magento local db and import it into your production server db
editing in production server
now on your production server you need to follow these two steps:
edit app/etc/local.xml file and change database info
in production db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:
SELECT *
FROM `core_config_data`
WHERE `value` LIKE 'http://%';
edit (thanks to comments):
Do not forget to delete var folder contents