我正在使用Opencart中的seo功能。除了一个案例外,一切正常。
在我的菜单中,我有几个子菜单,如下所示
- Tire Retreading
- Rounding
- Agricultural
- Equalizing
- Tires
- Michelin
- Agricultural
现在SEO网址重写应该给我一些网址:
http://domain.com/
http://domain.com/Tire-Retreading/
http://domain.com/Tire-Retreading/Rounding/
http://domain.com/Tire-Retreading/Rounding/Agricultural/
http://domain.com/Tire-Retreading/Equalizing/
http://domain.com/Tires/
http://domain.com/Tires/Michelin/
http://domain.com/Tires/Michelin/Agricultral/
除了这两个网址外,每个网址似乎都有效:
http://domain.com/Tires-Retreading/Rounding/Agricultural/
http://domain.com/Tires/Michelin/Agricultral/
结果是这两个网址中的一个成为另一个。
现在我想知道为什么以及如何让它工作,这样两个页面都会结束正确的链接。基础链接是:
http://domain.com/index.php?route=product/category&path=25_65_72
http://domain.com/index.php?route=product/category&path=36_70_67
_分隔的路径值分别是数据库中已知的category_id。
我的.htacces文件:
# 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]
这是默认的opencart。 我正在使用OpenCart v2.0.1.0