andymontgomery Posted April 14, 2011 Share Posted April 14, 2011 Hello, I have a problem with my redirect coding.Here's the problem - After updating to the latest version of Prestashop I lost a product page along the way and had to create a new one. The URL is different from the old one so I tried to add a permanent 301 redirect to my domain control panel feature since the original was fairly high in the search engines.I cannot get the 301 to direct - It simply goes into the shopping cart and displays a broken page - See Page - http://www.softplanetgroup.com/buy/notation-software/10-sibelius-6-educational.htmlIs this anything to do with .htaccess which resides in Prestashop?Any help is much appreciated.Andy Link to comment Share on other sites More sharing options...
jhnstcks Posted April 14, 2011 Share Posted April 14, 2011 If you have access to your sql db you could go in and manually alter the product id of the new product to the same as the old product was before, therefore the url would be correct. Link to comment Share on other sites More sharing options...
andymontgomery Posted April 14, 2011 Author Share Posted April 14, 2011 Thanks for the advice but I don't feel comfortable editing the database and would rather do it in a way in which I can't 'break' anything.Do you think the .htaccess file in prestashop is affecting my control panel redirects and would it do any harm to remove it? Link to comment Share on other sites More sharing options...
shokinro Posted April 15, 2011 Share Posted April 15, 2011 Do you think the .htaccess file in prestashop is affecting my control panel redirects and would it do any harm to remove it? Yes, I think it is the .htaccess reqwrite in action.I checked your site, you foillowing URL will be explained as Category "notation-software" and product "sibelius-6-educational" with id=10if you don't have product with id=10, then the 404 error will occur Link to comment Share on other sites More sharing options...
andymontgomery Posted April 15, 2011 Author Share Posted April 15, 2011 Hello, thanks for the info - would it be safe to remove the .htaccess file in prestashop so that my control panel redirects work? And, if so, would I need to change anything inside Prestashop so that it functions ok?Or, is it possible to add a redirection within the .htaccess file itself? I previously tried adding this code but it didn't work redirect 301 /buy/notation-software/10-sibelius-6-educational.html http://www.softplanetgroup.com/buy/computer-music/177-sibelius-6-education-price.html Any help much appreciated. Link to comment Share on other sites More sharing options...
shokinro Posted April 15, 2011 Share Posted April 15, 2011 If you remove .htaccess file, then you have to disable "Freindly URL" of PrestaShop, you can change this from back office.but I think this is drawback action of you PrestaShop SEO.Why not just change your redirect URL to match rewrite rules in .htaccess so that it will redirect to a correct page? Link to comment Share on other sites More sharing options...
andymontgomery Posted April 15, 2011 Author Share Posted April 15, 2011 Yes, I completely understand the value of the SEO friendly URL's.....Can you please give me a snippet of code example I could use for redirecting from one page to another - The code I entered didn't work.Thanks Link to comment Share on other sites More sharing options...
andymontgomery Posted April 16, 2011 Author Share Posted April 16, 2011 Anyone...Just had a thought - If I delete the 404.php file in Preferences - SEO will that allow my hosting control panel redirects to function properly? Or will this do something nasty to Prestashop? Link to comment Share on other sites More sharing options...
shokinro Posted April 16, 2011 Share Posted April 16, 2011 I guess that should not change anything on your redirect.because 404.php is just a customized 404 error page, even you removed, 404 will still happen but use default 404 error message if you removed yours. Link to comment Share on other sites More sharing options...
Recommended Posts