clehingue Posted October 21, 2013 Share Posted October 21, 2013 Bonjour, J'ai une question sur le rewrite url. (un lien expiquant mon pb : http://www.inveostore.com/community/google-adwords-gclid-problem-13 )Sur un site en prestashop le rewrite url est activé et cela fonctionne.Par contre, lors de la réécriture d'url, je perds cette info :" ?gclid=toto".Donc pour palier à ce problème et afin d'éviter de perdre ce gclid=toto je pense modifier mon .htaccess de cette façon :ajout de lignes:RewriteCond %{QUERY_STRING} ^gclid=([a-zA-Z0-9]*)$ [OR]RewriteCond %{QUERY_STRING} ^$Est-ce que ça te parait une bonne solution sachant que la suite du fichier .htacess contient les lignes suivantes :# URL rewriting rulesRewriteRule ^api/?(.*)$ /monsite/dispatcher.php?url=$1 [QSA,L].....Redirect permanent /banana-moon-maillot-de-bain- femme-bikini-accessoire-de-plage-lingerie,fr,3,142.cfm /monsite/fr/66-banana-moon QUESTIONS :est-ce que mes lignes en rouge sont correctes ?est-ce que le redirect permanent n'ecrase pas le rewritecond ?dois-je laisser {QUERY_STRING} ou mettre [QSA,L] à la place ?Ci-dessous un exemple de mon fichier .htaccess :============================== =====<IfModule mod_rewrite.c># URL rewriting module activationRewriteEngine on# URL rewriting rulesRewriteRule ^api/?(.*)$ /monsite/webservice/dispatcher.php?url=$1 [QSA,L]RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$1$2.jpg [L]RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$1$2$3.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$1$2$3$4.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /monsite/img/c/$1$2.jpg [L]RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /monsite/img/c/$1.jpg [L]RewriteRule ^c/([0-9]+)/[a-zA-Z0-9-]+\.jpg$ /monsite/img/c/$1.jpg [L]RewriteRule ^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /monsite/product.php?id_product=$2&isolang=$1 [QSA,L]RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html /monsite/product.php?id_product=$2&isolang=$1 [QSA,L]RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /monsite/category.php?id_category=$2&isolang=$1&noredirect=1 [QSA,L]RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]* /monsite/category.php?id_category=$2&isolang=$1 [QSA,L]#redirection entre l'ancien site et le nouveauRedirect permanent /rio-soutien-gorge-armatures-carla-bikini,fr,4,CA122101rioorange.cfm /monsite/maillots-de-bain/143-maillot-de-bain-rio-balconnet-grande-taille.htmlRedirect permanent /mambo-bandeau-twist-carla-bikini,fr,4,CA122102mambojaune.cfm /monsite/maillots-de-bain/144-mambo-bandeau-twist.html</IfModule># Catch 404 errorsErrorDocument 404 /devcarlabikini/404.php<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year"</IfModule>FileETag INode MTime Size<IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/html text/css text/plain text/javascript application/javascript application/x-javascript </IfModule></IfModule>=================================== Link to comment Share on other sites More sharing options...
Creator Posted February 11, 2014 Share Posted February 11, 2014 I have the same problem with gclid and i didnt solved yet. All the data from Google Analytics are show as: "not set" I've asked the Google support team and they saidthat is problably a problem with the rewrite of url. Does anybody know where i could set/check the " ?gclid" parameter in Prestashop ? Link to comment Share on other sites More sharing options...
Alexgaw Posted December 16, 2014 Share Posted December 16, 2014 I need to resolve this issue also. Anyone that has a solution please share! 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