我使用wamp安装了magento。Magento可以显示主页,但如果我点击主页上的某个东西,我会得到The requested URL /magento/accessories/eyewear.html was not found on this server.
。我清除了缓存,并重新索引了所有内容。我找到了一些解决方案,比如RewriteBase /magento/
或关于apache虚拟主机的东西
<VirtualHost *:80>
...
<Directory /var/www/magento/>
AllowOverride All
</Directory>
</VirtualHost>
但我不知道该怎么做。你有什么建议可以帮助我解决问题吗?apache文件夹中的httpd.conf有
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf.
我不知道如何解决这个问题。
1)确保.htaccess文件完好无损。
从安装文件中重新复制它,或在线查找优化版本之一,例如以下版本:http://www.learnmagento.org/magento-tutorials/best-htaccess-magento/
2) 如果这不起作用,那么在WAMP的httpd.conf文件中可能会禁用mod_rewrite。
在httpd.conf中,可以找到以下行:
#LoadModule rewrite_module modules/mod_rewrite.so
并更改为(删除#
):
LoadModule rewrite_module modules/mod_rewrite.so
然后重新启动WAMP