ilian2001 Posted January 23, 2009 Share Posted January 23, 2009 Hello to all, I currently run an e-commerce, which has a pretty good ranking for the products I sell, niche products. I regularly come first on the products I sell on Gg. If I plan to switch to Prestashop, is there a way for me not to lose these rankings, or would they be lost from the minute I change the page URL -provided of course that I keep the same root address, but change the page directory config ?Thanks for your remarksBest regards, Fred Link to comment Share on other sites More sharing options...
Dave Egerton Posted January 23, 2009 Share Posted January 23, 2009 remember that if you have different URL's for the new site compared to the current site these will be brokenLook into 301 redirects on the internetAlso, submit a siteMap when you go live and make sure your site is optimised for you keywordsYou can never guarantee how the search engines will see the new site (there are 100's of measures search engines use) but you can make sure you take steps to help them understand what your about Link to comment Share on other sites More sharing options...
ilian2001 Posted May 6, 2009 Author Share Posted May 6, 2009 Hello Dave and all,I finally launched my new site (hurried by the closing of former one), but I couldn't retrive the old links I had using the 301 redirects, I guess I must be doing it wrong.I used to have a shop where the URL's structure was something like:http://terresdaperitifs.com/boutique/fiche_produit.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_frNot really friendly, is it ?I've put my new shop running under Prestashop (v1.1 running on a OVH shared server), with URL friendly, and I want the same address to redirect to http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.htmlTherefore on my .htaccess under the www/ directory, I've inserted a redirect instruction; SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 RewriteBase / # URL rewriting module activation RewriteEngine on RewriteBase /boutique/ # URL rewriting rules RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^/boutique/fiche_produit.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_fr$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html [R=301,NC] # Catch 404 errors ErrorDocument 404 /boutique/404.php Guess what, it forwards me to the 404 page (of prestashop).Would you have any idea ?Thanks in advanceFred Link to comment Share on other sites More sharing options...
misty Posted May 7, 2009 Share Posted May 7, 2009 Hi ilian2001,It doesn't work because of the '?' in the URLs, in fact the '?' and what follows is called a query string andmust be handled differently.Try :RewriteRule ^/boutique/fiche_produit\.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_fr$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]Or you can use RewriteCond %{QUERY_STRING} but it's longer. Link to comment Share on other sites More sharing options...
ilian2001 Posted May 7, 2009 Author Share Posted May 7, 2009 Dear Misty, thank you, though it's still not working.Should I put this htaccess under the root folder, or the /boutique/ ? Then, are you sure about the "/" and the question mark after the redirection ?I've got about 100 redirections to type, so do you think this is a reasonable choice to write them all in the htaccess ?That's a lot of questions, thank you in advance.Best regardsFred Link to comment Share on other sites More sharing options...
jhnstcks Posted May 7, 2009 Share Posted May 7, 2009 If your hosting includes cpanel there is a redirect tool on that, its much easier to use and inserts the correct syntax into your htaccess file. Link to comment Share on other sites More sharing options...
misty Posted May 7, 2009 Share Posted May 7, 2009 Hi Ilian2001,If URL rewriting is working that means your .htaccess is at the right place.About the "/" you mean the "\" ? you have to escape some characters like "." in left expressions.You can safely put as many as 100 redirections in your file, I was in the same situation as you3 months ago except my site has more than 3000 URLs and it's working fine, it's a temporary situationand my site is fast enough.=> Don't wait, use the quickest method because the more you wait, the more you loose ranks in google and others.So you have to use QUERY_STRING, it's 2 lines for each URL containing a '?' you want to redirect :RewriteCond %{QUERY_STRING} ^ref=gold_strike&num=41&type=5&code_lg=lg_fr$RewriteRule ^/boutique/fiche_produit\.cfm$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]The "?" at the end is to discard "ref=gold_strike&num=41&type=5&code_lg=lg_fr", if you don't put the "?" It will append it to your newURL, which is not what you want.There is a small tutorial here if you want :http://www.simonecarletti.com/blog/2009/01/apache-rewriterule-and-query-string/ Link to comment Share on other sites More sharing options...
misty Posted May 7, 2009 Share Posted May 7, 2009 Oh and BTW I found that :http://www.terresdaperitifs.com/boutique/is not redirected tohttp://terresdaperitifs.com/boutique/I think you chose not to have the www anymore, so be very careful to redirect 301 oryou will have each URL twice, which is very bad for Google.If you have a Google Webmaster Tools account, I advise you to specify if you want www.terresdaperitifs.com or terresdaperitifs.com in Paramètres / Domaine Favori, don't forget to specify "Zone géographique ciblée" to France if you want to optimise for google.fr Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 Dear Misty,I'm really grateful that you tried and help me, but....it still does not work.There must be some obvious stupid little detail I can't understand somewhere.Here attached my htaccess of the www/boutique/ folder (I've copied the same on the www root folder). SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 RewriteBase / # URL rewriting module activation RewriteEngine on RewriteBase /boutique/ # URL rewriting rules RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E] RewriteCond %{QUERY_STRING} ^ref=gold_strike&num=41&type=5&code_lg=lg_fr$ RewriteRule ^/boutique/fiche_produit\.cfm$ http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L] # Catch 404 errors ErrorDocument 404 /boutique/404.php I thought there might be an order, and tried different configurations, this made no difference.And thank you also for your www advise, I changed it on my index.php.Best regardsFred Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 Could it be linked to the fact that I'm sending multiple variables (ref, num, type and code_lg) ? Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 OK, I think it's because all is in /boutique, and with "RewriteBase /boutique/" all the rewrite shouldbe related to this path.Can you try this one (removed /boutique) :RewriteRule ^/fiche_produit\.cfm$ http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L] Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 I already did... Not better ! Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 I just had a look to my .htaccess to see what's wrong with yours.First thing is you can't start with '/' in ReWriteRule (starting with '/' is for Redirect directive, not RewriteRule,I messed up because I have both ReWriteRule and Redirect in my htaccess).So it could be :RewriteRule ^fiche_produit\.cfm$ http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]Maybe it will still not work because of "http://www.terresdaperitifs.com", in my htaccess I put that only in Redirect, not RewriteRule. 1 Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 YYYYYYYYEEEEEEEEESSSSSSSSSS !!!!Thank you very much for that, I'm sure you've spent quite a while. If you happened to come by Paris one of these days just hop in !Best regardsFred Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 Eheh, in fact I'm french and live in Vincennes.On aurait peut être pu parler en français dès le début, mais c'était dans un fil en anglais alors... Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 Vu les horaires de réponse, (2:48AM), je m'étais imaginé un généreux australien en bottes de croco. Passe un jour nous voir (rue d'Auteuil, attention, c'est le grand ouest).Je viens par ailleurs de me rendre compte que Gg ou mon ancien prestataire avait indexé les adresses avec des variables dans un ordre parfois différent (genre ref puis lg puis num) de ce que c'était sur le site... Grrrrr, ça double le boulot. Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 J'essaierai de passer vous voir, vous avez des produits très sympas Concernant tes URLs indexées, je te conseille pour les traquer la commande google suivante :site:terresdaperitifs.comJ'attire ton attention sur le fait que par exemple :http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.htmlhttp://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.htmlfonctionnent tous les deux.Aussi tout ton site se retrouve en double, c'est très pénalisant pour le référencement.Il faut absolument que tous les www redirigent vers la version non www, puisque c'est ce quetu sembles avoir choisi pour la nouvelle version de ton site (personnellement j'aurai gardé le www,c'est déjà difficile une migration, si en plus on migre de domaine c'est encore plus dur ). Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 Astuce : si tu veux les URLs qui sont indexées sur google et qui sont sans le www tu peux faire :site:terresdaperitifs.com -site:www.terresdaperitifs.com Link to comment Share on other sites More sharing options...
ilian2001 Posted May 8, 2009 Author Share Posted May 8, 2009 Et si je ne voulais garder que www ? J'ai inséré dans mon htaccess (qui n'en est plus à ça près) RewriteCond %{HTTP_HOST} ^terresdaperitifs.com[QSA,L,E] RewriteRule ^(.*) http://www.terresdaperitifs.com/$1 [L,R=301] mais ça ne semble pas suffire Link to comment Share on other sites More sharing options...
misty Posted May 8, 2009 Share Posted May 8, 2009 OK il faut aussi aller dans le BO Prestashop de ton site, dans Outils/Sous Domaines, ajouter www Link to comment Share on other sites More sharing options...
need4speed Posted May 25, 2011 Share Posted May 25, 2011 a real france love story Link to comment Share on other sites More sharing options...
Recommended Posts