我正在使用Magento 1.9.1。我在服务器中成功安装了Magento。但当我浏览前端的任何子页面(例如:关于我们、联系我们、登录等)时,它会显示404未找到错误。但是主页显示正确。
我的home
页面url类似于this: http://mydomain.in/store
。此显示正常。我的Contact Us
页面为:http://mydomain.in/store/contacts
。这显示未找到错误但是当我像http://mydomain.in/store/index.php/contacts
这样手动键入url时。这显示正在工作。也就是说,当添加index.php
时,它开始工作。
我如何使其工作
我找到的解决方案:Change 'Use Web Server Rewrites' to NO in System->Configuration->Web->Search Engine Optimization.
这是可行的,但url包含index.php
,就像http://mydomain.in/store/index.php/contacts.
一样。我认为http://mydomain.in/store/contacts
是标准的,应该可以(但我不知道如何)。另一个问题是User Logging, checkout etc
在这里不起作用。为了使工作,我们可以在相应的页面中添加form key
。但这并不可取,因为许多页面都必须更改。
另一个解决方案是:make enable apache mod rewrite. Uncomment this line LoadModule 'rewrite_module modules/mod_rewrite.so' inside 'wamp'bin'apache'apache2.4.9'conf'httpd.conf'.
我的问题是如何避免在Magento子页面中出现404未找到错误当我遵循上面的解决方案时,url路径包含index.php。类似日志记录的功能变得不起作用。
如何避免url中的index.php
我的文件夹结构是D:'wamp'apache2'htdocs'site'store
存储文件夹包含magento files.
home page
在http://mydomain.in/store.
中可用
请帮帮我。任何帮助都是值得的。。
为了避免URL中的index.php,您必须在服务器上启用mod_rewrite
,然后从Magento管理面板转到System->conguration->web->Search Engines Optimization
并将标志Use Web Server Rewrites
设置为Yes
。清除缓存并尝试一下。