CMS更新后更改了URL结构

时间:2014-06-03 09:49:04

标签: url content-management-system prestashop updates

我负责更新现有的Prestashop 1.4.1.4网站。产品的网址如下:

  

URL / product.php?id_product = 1322

但是当我更新到新版本1.6.0.6时,它变得像:

  

URL / index.php的id_product = 1372&安培;控制器=产物&安培; id_lang = 2

当我在浏览器中输入时:

  

URL / product.php?id_product = 1322

它引导我到404页面。

感谢您的帮助。

2 个答案:

答案 0 :(得分:2)

product.php在PrestaShop 1.5中已弃用,已在PrestaShop 1.6中删除。

Download PrestaShop 1.5并将product.php复制到PrestaShop根文件夹。

答案 1 :(得分:0)

在.htaccess文件中添加这些行

RewriteCond%{QUERY_STRING} ^ id_product =([0-9] *)$ RewriteRule ^ product.php $ index.php?id_product =%1& controller = product [L,R = 301]

RewriteCond%{QUERY_STRING} ^ id_category =([0-9] *)$ RewriteRule ^ category.php $ index.php?id_category =%1& controller = category [L,R = 301]

RewriteCond%{QUERY_STRING} ^ id_cms =([0-9] *)$ RewriteRule ^ cms.php $ index.php?id_cms =%1& controller = cms [L,R = 301]

RewriteCond%{QUERY_STRING} ^ id_manufacturer =([0-9] )& p =([0-9] )$ RewriteRule ^ manufacturer.php $ index.php?id_manufacturer =%1& p =%1 =& controller = manufacturer [L,R = 301]