我将一个网站移到了一个magento的新域名。主页运行良好,但所有链接都给出 404。
我验证了 httpd.conf 中启用了"*LoadModule rewrite_module modules/mod_rewrite.so*"
.htaccess 有这样的条目:
## rewrite everything else to index.php
RewriteRule .* index.php [L]
旧网站
http://old_site.com/ << this works
http://old_site.com/en/contentpage.html << this works
新网站
http://newsite.com/shop1/en
http://newsite.com/shop1/en/contentpage.html << this is a typical link from the home page
<< link from new site takes me here, but this gives 404 error
http://newsite.com/shop1/index.php/en/contentpage.html < this link, however, does works
http://newsite.com/shop1/en/contentpage.html << link from new site takes me here, but this gives 404 error
.
根据您提供的描述,看起来在安装过程中没有设置"使用 apache 重写"选项,或者迷路在某处。
检查core_config_data
表中的路径web/seo/use_rewrites
- 它的值应为 1,如果没有,请将其设置为 1。