【发布时间】:2020-05-12 15:55:26
【问题描述】:
在 OpenCart 管理面板中启用 SEO URL 后,所有链接都返回 404 - 未找到。
我的 .htaccess 文件
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
该站点位于/var/www/html/opencurt,我正在尝试更改为RewriteBase /opencurt,但这对我没有帮助。我还清除了缓存。
我本地机器上的当前 URL 是http://127.0.0.1/
我知道这是常见问题,但我无法自己解决。
【问题讨论】:
-
你用的是什么版本的OC? htaccess 文件名是 .htaccess 还是 .htaccess.txt? 404 甚至在管理面板上?
-
我使用 ocStore-3.0.2.0 和我的 OC Linux Mint,是的,我使用 mv 命令重命名 .htaccess
标签: php apache .htaccess opencart