gpt4 book ai didi

php - 启用 SEO 时分页在 opencart 中不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:45:37 24 4
gpt4 key购买 nike

您好,我正在为我的一个网站使用 Opencart,但我意识到当我打开 SEO 关键字时,分页不起作用。当 SEO 关闭时,它工作正常。

有没有人知道为什么会这样。

我试图在 opencart 论坛上找到答案,但没有运气,而且我在堆栈溢出上也找不到任何东西......

这是我的 htaccess 文件的代码。

Options +FollowSymlinks
# Prevent Directoy listing Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# 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=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^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]

这是其中一个页面的链接

http://pubstuff.co.za/Bar/Ashtrays

在category.php页面可以看到分页代码

$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');

它试图调用“链接”或 url 仍然作为正确项目的路径,但我不知道如何更改它以调用新呈现的 SEO 友好 URL 的 URL

有人可以帮忙吗

最佳答案

在您提供的链接中,没有足够的产品导致分页。在产品数量至少超过 25 个限制之前,您不会获得分页。

关于 http://pubstuff.co.za/Gifts-and-novelties/Other-gifts情况就是这样 - 87 件商品,但是,当我选择 25 件的列表限制时,页面会自动重新加载 100 件产品限制,因此我无法确认这是错误的。正如上面的 shadyyx 评论,默认 SEO 没问题,所以可能是您主题中的某些内容导致了错误。

关于php - 启用 SEO 时分页在 opencart 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20069373/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com