URL structure changed after CMS update

前端 未结 2 1385
孤街浪徒
孤街浪徒 2021-01-26 11:31

I take in charge the update of an existing Prestashop 1.4.1.4 website. The url for a product was like:

url/product.php?id_product=1322

相关标签:
2条回答
  • 2021-01-26 12:04

    add those lines on your .htaccess file

    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]

    0 讨论(0)
  • 2021-01-26 12:14

    product.php was deprecated in PrestaShop 1.5 and was removed in PrestaShop 1.6.

    Download PrestaShop 1.5 and copy product.php to your PrestaShop root folder.

    0 讨论(0)
提交回复
热议问题