如何从opencart v 3.0.2中删除index.php

时间:2017-12-11 08:56:23

标签: php .htaccess url opencart

我已在我的localhost中安装了opencart版本3.0.2。一切正常,除了seo友好网址。当我尝试删除index.php?route=...时 然后我遇到404错误。当我尝试在我的.htaccess文件

中使用代码时
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L] 

然后404错误消失但产品无法显示。 当我获取默认.htaccess文件时,seo友好网址会显示404错误。 请帮我。 感谢

1 个答案:

答案 0 :(得分:0)

您必须从管理面板中启用seo URL。 转到系统>设置>编辑>服务器>检查是否使用seo网址。 并确保您的所有产品和类别都有正确的seo-url数据,并用' - '替换任何空格。

相关问题