fitgura Posted February 11, 2013 Share Posted February 11, 2013 Hi All! Let me ask you please! When I switch off a product (because not available) there is an error message "product no longer available But google webmaster tools do not like this and give us a faulty point! I made a CMS page mysite.com/content/product-not-available.html How can I redirect the unavailable products to this site instead of simple 404.php?? We use Ps. 1.4.8.2 Please help me! Thanks Link to comment Share on other sites More sharing options...
PascalVG Posted February 11, 2013 Share Posted February 11, 2013 In controllers/productcontroller.php you could redirect the page to your page, instead of showing the error box: (code from PS 1.4.6.2, hope that it's similar to yours) { // header('HTTP/1.1 404 page not found'); // comment out these two lines // $this->errors[] = Tools::displayError('Product is no longer available.'); header("Location: http://www.mysite.com/content/product-not-available.html"); // add this line } (Not sure if you officially still need to give a http:/1.1 header first) My 2 cents, Pascal 3 Link to comment Share on other sites More sharing options...
kiteman Posted February 11, 2013 Share Posted February 11, 2013 Hi, I also had these "fault" in google webmaster tools and I also changed the lines in productcontroller.php a few weeks ago, but I'm getting now a new fault in GWT saying I'm using "soft 404". here is the GWT message While crawling your site, we have noticed an increase in the number of transient soft 404 errors around 2012-11-20 22:00 UTC (London, Dublin, Edinburgh). Your site may have experienced outages. These issues may have been resolved. Here are some sample pages that resulted in soft 404 errors: here is the page about soft 404 http://support.google.com/webmasters/bin/answer.py?hl=en&answer=181708 So, now I d'ont know what to do : 404 or 301 generate both errors in GWT !! Link to comment Share on other sites More sharing options...
PascalVG Posted February 12, 2013 Share Posted February 12, 2013 Hmm, as I read the google message, they don't care that much if there's a 404 error (can't imagine it really punishes your site severely for having pages like this...), but they DO like the error number to be announced clearly. So maybe add the first line that we commented out... (The one that calls the 404 error)?? Link to comment Share on other sites More sharing options...
kiteman Posted February 12, 2013 Share Posted February 12, 2013 Hi PascalVG, Thank you for your response. Note that the header("Location: ...; adds a 301 response. Maybe it could be better to add a 404 header and after this, the location ? (that generates a 301) ?? I could try it, Link to comment Share on other sites More sharing options...
fitgura Posted February 13, 2013 Author Share Posted February 13, 2013 Hi Pascal! It is working, but let me an other question! What if I delete a product? Your solution only works when a product swtched off (inactivated) I should need to redirect too when I delete a product and the message is simply "product not found" Please advise me where else could I put an other header(location... line???!! Thanksd Fitgura Link to comment Share on other sites More sharing options...
PascalVG Posted February 13, 2013 Share Posted February 13, 2013 Hmm, how would you go to that page in the first place, if the product is really gone? Normally, there should not be any links anymore then... When time, I'll see if I can think of a scenario and try to give some idea how to handle. Please help think if this scenario is realistic and worth the efforts, though... Link to comment Share on other sites More sharing options...
fitgura Posted February 14, 2013 Author Share Posted February 14, 2013 Hi Pascal! I solve it as you advise at prodct no longer available I put a same header to the product not found line (in productcontroller.php line 94-95) Just I don't know what the google will think about this redirection if a lot of products are unavailable almost 9000 deleted or inactive I hope the negative points will decrease I'll see. Thanks again! Link to comment Share on other sites More sharing options...
tomerg3 Posted February 14, 2013 Share Posted February 14, 2013 You can also get http://www.prestashop.com/forums/index.php?/topic/39736-module-duplicate-url-redirect-redirect-all-duplicate-and-non-seo-friendly-urls-to-the-default-friendly-url/ It actually uses a 302 redirect (which is better) for disabled products / categories, and redirects the the parent category (along with other useful redirects), Link to comment Share on other sites More sharing options...
fitgura Posted February 15, 2013 Author Share Posted February 15, 2013 (edited) Hi Tomreg! Do you think is your module could solve my problem?? Because anything I do google is just spread more and more faulty point! Huh! I'm really nervous now! under a day increased with 400 NOT found link in webmaster tools! Even I redirect the deleted products to a cms page - for google no matter and will get an other pagerank point from us! Drive me crazy, please help me! PS. 1.4.8.2 Thanks! Edited February 15, 2013 by fitgura (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted February 15, 2013 Share Posted February 15, 2013 Yes, it will help, there are more than 1,000 customers using it (including us on our site). It takes google about 1-3 months to update their DB, but you will be able to see right away that they get redirected. 1 Link to comment Share on other sites More sharing options...
fitgura Posted February 18, 2013 Author Share Posted February 18, 2013 (edited) Hi Tomerg! Then I buy it now and will see! THX. Edited February 18, 2013 by fitgura (see edit history) Link to comment Share on other sites More sharing options...
siomosp Posted February 24, 2013 Share Posted February 24, 2013 Hello , there is a solution for not friendly url enabled shops? Link to comment Share on other sites More sharing options...
Mikesun Posted February 25, 2013 Share Posted February 25, 2013 On 2/24/2013 at 5:22 PM, siomosp said: Hello , there is a solution for not friendly url enabled shops? Maybe it has! But I also have not find it ! Link to comment Share on other sites More sharing options...
fitgura Posted March 26, 2013 Author Share Posted March 26, 2013 (edited) On 2/15/2013 at 1:22 PM, tomerg3 said: Yes, it will help, there are more than 1,000 customers using it (including us on our site). It takes google about 1-3 months to update their DB, but you will be able to see right away that they get redirected. Hi Tomerg! I did buy your module install it and upload the FontController.php but what the next?? What could I see?? Before that I did what Pascal offered to me... I don't know how to decide what your module do?? How to test it? Please advise Edited March 26, 2013 by fitgura (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted March 26, 2013 Share Posted March 26, 2013 Once you copy the override file, the module is active, and it would automatically do all the redirects it is designed to. You can test to make sure it is active by going to a product page, and changing the ID in the URL to a high number that doesn't exist, if it gets redirected to the homepage, the module is working. If you get a 404 error, something is not correct, you can use the contact form on our site for support. Link to comment Share on other sites More sharing options...
fitgura Posted March 27, 2013 Author Share Posted March 27, 2013 On 3/26/2013 at 2:49 PM, tomerg3 said: Once you copy the override file, the module is active, and it would automatically do all the redirects it is designed to. You can test to make sure it is active by going to a product page, and changing the ID in the URL to a high number that doesn't exist, if it gets redirected to the homepage, the module is working. If you get a 404 error, something is not correct, you can use the contact form on our site for support. Hi Tomerg! Thanks it is working perfectly Kind Regards Fitgura 1 Link to comment Share on other sites More sharing options...
Bruna BSPCU Posted March 27, 2013 Share Posted March 27, 2013 There is a module called DUPLICATE URL REDIRECT, you can look for it, maybe will help you! Link to comment Share on other sites More sharing options...
fitgura Posted April 2, 2013 Author Share Posted April 2, 2013 This is the perfect module! under 3 days the the 3971 faults goes down to 0! Must have plugin for every presta user! Link to comment Share on other sites More sharing options...
Recommended Posts