问题
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
But when I update to the new version 1.6.0.6, it became like:
url/index.php?id_product=1372&controller=product&id_lang=2
When I type in the browser:
url/product.php?id_product=1322
It leads me to 404 page.
Your help is appreciated.
回答1:
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.
回答2:
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]
来源:https://stackoverflow.com/questions/24012022/url-structure-changed-after-cms-update