0

我将 100% 工作的 magento 站点从实时服务器移动到我的本地主机。

搬家成功了。

但是有一个问题是主页会正确显示。

但是当我点击其他导航菜单时,它会显示 404 not found 错误消息。

例如这是我的网站链接:

http://localhost/bc/

现在该网站已完美加载,但是当我单击菜单时,网址为:

http://localhost/bc/fresh-fruit.html

它显示 404 not found 错误。

如果我将 index.php 包含在它们之间,则该页面正确加载,即:

http://localhost/bc/index.php/fresh-fruit.html

上面的链接正确加载了点击的页面。

那么我该如何解决这个问题呢?

真正的问题是什么?

这是显示的错误消息:

Not Found

The requested URL /bc/fresh-fruit.html was not found on this server.
4

1 回答 1

4

It looks like URL rewriting is not working on your localhost. Assuming you're using Apache on your localhost, here's some things to check:

  1. Check that the .htaccess file exists in your /bc folder. .htaccess is a hidden file so it's easy to not copy it across when you copied the rest of the site (especially if using graphical tools)
  2. Check that mod_rewrite is enabled on your server.
  3. Check that .htaccess files are enabled for the /bc folder.
  4. Check that file permissions allow the apache user to read the .htaccess file (note: Apache runs as a different user to your normal login, so the fact that you might be able to read it doesn't necessarily mean Apache can.
于 2012-07-25T04:41:09.657 回答