Magento的的.htaccess从商店的url删除的index.php商店、htaccess、Magento、php

2023-09-02 01:00:07 作者:灵魂阐述师¢

我不希望我在我的商店的网址包含的index.php。我所有的产品页面可以通过添加的index.php,没有它来访问这是不好的,我想从网址摆脱index.php文件中。

I do not want my URLs on my Store to contain index.php. All my product pages can be accessed via addition of index.php and without it which is not good and I want to get rid of index.php from the urls.

例如,这两个网址显示相同的内容,但我只希望用户曾经被定向到第二个网址: http://www.pudu.com.au /index.php/outback-mens-denim-cargo-shorts.html &放大器; http://www.pudu.com.au/outback-mens -denim-货物shorts.html

For example, both of these urls display the same content, but I only want users to ever be directed to the second URL: http://www.pudu.com.au/index.php/outback-mens-denim-cargo-shorts.html & http://www.pudu.com.au/outback-mens-denim-cargo-shorts.html

同样,对于在现场的顶层内容: http://www.pudu.com.au/index.php &功放; http://www.pudu.com.au/

Likewise for content at the top level of the site: http://www.pudu.com.au/index.php & http://www.pudu.com.au/

推荐答案

Magento的增加了系统的端点(的index.php)根据配置设置的URL路径。在管理中,导航系统>配置。在Web节,打开搜索引擎优化组,并设置使用的Web服务器改写为是。你需要清空配置缓存和redindex此后URL重写。

Magento adds the system endpoint (index.php) to the URL path based on a configuration setting. In the admin, navigate to System > Configuration. In the Web section, open the Search Engines Optimization group and set Use Web Server Rewrites to "Yes". You'll need to flush the configuration cache and redindex URL rewrites thereafter.