【发布时间】:2020-03-21 11:42:25
【问题描述】:
我在过去 3 天的开放购物车网站上苦苦挣扎。 我正在使用 opencart 2.3.0.2。 Seo url 选项对我不起作用。 以下是 .htaccess 文件和 opencart 网站文件的路径。
.htaccess 路径:/var/www/opencart/upload 应用程序文件:/var/www/opencart/upload
下面是我的 htaccess 文件。
RewriteEngine On
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/download/(.*) 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]
我尝试使用以下选项更新 RewriteBase
RewriteBase /opencart/upload/
RewriteBase /upload/
提前感谢您的帮助
【问题讨论】:
-
需要更多信息:您网站的 docroot 是什么?您是否在管理员中打开了 seo 网址?您在商店中为网址设置了关键字吗?
-
@billynoah 是的 SEO URL 已经设置在那里,我有 URL 的关键字。你能告诉我在哪里可以找到网站的 docroot
-
DocumentRoot /var/www/opencart/upload
-
您是否在管理员中打开了 seo 网址?
标签: php .htaccess opencart url-routing opencart2.x