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

how to remove index.php from opencart v 3.0.2

我已经在我的本地主机上安装了 opencart 版本 3.0.2。一切正常,除了 seo 友好 url。当我尝试删除 index.php?route=... 然后我得到 404 错误。当我在 .htaccess 文件

中尝试使用以下代码时
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/[=11=] [PT,L] 

然后 404 错误消失但产品不显示。 当我取回默认 .htaccess 文件时,seo 友好 url 显示 404 错误。 请帮我。 谢谢

您必须从管理面板打开 seo urls。 转到系统>设置>编辑>服务器>勾选是使用 seo urls。 并确保您所有的产品和类别都具有正确的 seo-url 数据,并将任何 space 替换为“-”。