Jump to content

Problem with product pages urls after PS upgrade


DARKF3D3

Recommended Posts

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?

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

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...

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...

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

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);
}
?>

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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

Hey Jude (this remember me something :lol: )

 

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

  • 3 weeks later...
  • 11 months later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...