DARKF3D3 Posted October 3, 2014 Share Posted October 3, 2014 Recently I upgraded my website from PS1.4.9 to PS1.6.0.9.After the upgrade in notice that Google Webmaster Tool started showing me a lot of error of page not found, i have hundreds of error like this: product.php?id_product=322 404 product.php?id_product=162 404 product.php?id_product=234 404 product.php?id_product=54 404 ... ... There's a way to fix this? 1 Link to comment Share on other sites More sharing options...
Daniel_WM Posted October 3, 2014 Share Posted October 3, 2014 post the url of the site, to better understand Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 4, 2014 Author Share Posted October 4, 2014 Hi Daniel, the url of the website is in signature. Thanks Link to comment Share on other sites More sharing options...
agenceweb74 Posted October 31, 2014 Share Posted October 31, 2014 The url format has been changed between Prestahop 1.4 and Prestashop 1.6, using or not the url rewriting. product.php no longer exists. You may create htaccess redirection or simply create a product.php file that will handle the redirection: <?php if(isset($_GET['id_product'])) { header('Location: /index.php?id_product='.$_GET['id_product'].'&controller=product',true,301); exit; } else { header('Location: /', true, 301); } ?> This is exactly the same for category.php and so on... 3 1 Link to comment Share on other sites More sharing options...
MusikMachineMan Posted November 7, 2014 Share Posted November 7, 2014 Hi agenceweb74 thanks for this tip, i've created this product.php file, should i put it at the root of the website ? regards Link to comment Share on other sites More sharing options...
agenceweb74 Posted November 7, 2014 Share Posted November 7, 2014 Hi agenceweb74 thanks for this tip, i've created this product.php file, should i put it at the root of the website ? regards Root of the public content of the website (in htdocs / public_html folder), next to your admin folder. Then try to access an old URL Link to comment Share on other sites More sharing options...
sunda03 Posted March 3, 2015 Share Posted March 3, 2015 The url format has been changed between Prestahop 1.4 and Prestashop 1.6, using or not the url rewriting. product.php no longer exists. You may create htaccess redirection or simply create a product.php file that will handle the redirection: <?php if(isset($_GET['id_product'])) { header('Location: /index.php?id_product='.$_GET['id_product'].'&controller=product',true,301); exit; } else { header('Location: /', true, 301); } ?> This is exactly the same for category.php and so on... Thanx for the tip agenceweb74, I have 2 questions : - I have created the product.php file and put it on the root of the server. However, when I test the 404 urls of Webmaster Tool, I still have a 404 - For the category, is this syntaxe correct ? /category.php?id_product='.$_GET['id_product'].'&controller=product',true,301); ? Thank you in advance Link to comment Share on other sites More sharing options...
agenceweb74 Posted March 3, 2015 Share Posted March 3, 2015 Hello Sunda03 , I have 2 questions : - I have created the product.php file and put it on the root of the server. However, when I test the 404 urls of Webmaster Tool, I still have a 404 What if your test in your browser ? Please give us the urls. Probably those urls are no longer products urls but categories, cms, etc... - For the category, is this syntaxe correct ? /category.php?id_product='.$_GET['id_product'].'&controller=product',true,301); ? Thank you in advance No, you'll have to use (tested) : <?php if(isset($_GET['id_category'])) { header('Location: /index.php?id_category='.$_GET['id_category'].'&controller=category',true,301); exit; } else { header('Location: /', true, 301); } ?> 1 Link to comment Share on other sites More sharing options...
sunda03 Posted April 22, 2015 Share Posted April 22, 2015 Hello Agenceweb74 (my name is Jude it will be easier ) Well, actually I tested in the browser but I still have an error. Here is a sample url : http://waahooo.fr/coque-rechargeable-iphone-5/product.php?id_product=3 => It's still display 404 What I did so far: - created a product.php and a category page with the codes you provided (no modifications) - put both of them on the root of the server. Thanx again Hello Sunda03 , What if your test in your browser ? Please give us the urls. Probably those urls are no longer products urls but categories, cms, etc... No, you'll have to use (tested) : <?php if(isset($_GET['id_category'])) { header('Location: /index.php?id_category='.$_GET['id_category'].'&controller=category',true,301); exit; } else { header('Location: /', true, 301); } ?> Link to comment Share on other sites More sharing options...
agenceweb74 Posted April 22, 2015 Share Posted April 22, 2015 Hey Jude (this remember me something ) Your 404 urls looks weird, it mix url rewriting with non url rewriting. I guess the problem may come from those wrong URLs that get indexed once. Sample provided are working with urls such : http://waahooo.fr/product.php?id_product=34 You will probably have to deal with .htaccess manual Redirect. See http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect Link to comment Share on other sites More sharing options...
sunda03 Posted April 23, 2015 Share Posted April 23, 2015 Definitly weird I guess you're right, let's do it manually! Link to comment Share on other sites More sharing options...
mysterion Posted May 11, 2015 Share Posted May 11, 2015 @agenceweb74 Just wanted to thank you for this fix which worked perfectly for my upgrade. Many thanks! 1 Link to comment Share on other sites More sharing options...
agenceweb74 Posted May 11, 2015 Share Posted May 11, 2015 Glad it helped you ! Link to comment Share on other sites More sharing options...
MovilTecno Posted May 2, 2016 Share Posted May 2, 2016 The url format has been changed between Prestahop 1.4 and Prestashop 1.6, using or not the url rewriting. product.php no longer exists. You may create htaccess redirection or simply create a product.php file that will handle the redirection: <?php if(isset($_GET['id_product'])) { header('Location: /index.php?id_product='.$_GET['id_product'].'&controller=product',true,301); exit; } else { header('Location: /', true, 301); } ?> This is exactly the same for category.php and so on... Thanks for the info. Is very good. Link to comment Share on other sites More sharing options...
MovilTecno Posted May 2, 2016 Share Posted May 2, 2016 Hello Agenceweb74 (my name is Jude it will be easier ) Well, actually I tested in the browser but I still have an error. Here is a sample url : http://waahooo.fr/coque-rechargeable-iphone-5/product.php?id_product=3 => It's still display 404 What I did so far: - created a product.php and a category page with the codes you provided (no modifications) - put both of them on the root of the server. Thanx again Hi, I have to write for the new-product.php that also gives a 404 error ?? Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now