【发布时间】:2013-11-19 10:45:47
【问题描述】:
您好,我在我的一个网站上使用 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
有人可以帮忙吗。
【问题讨论】:
-
通过新呈现的 SEO 友好 URL 你的意思是你已经安装了一些 SEO 扩展?因为只使用
seo_keyword字段和默认的 OpenCart 的 SEO 功能,这工作正常...... -
只是opencert的标准seo关键字功能...
标签: php pagination seo opencart