TiltAgain Posted August 24, 2010 Share Posted August 24, 2010 Bonsoir, aprés un certain temps d'adaptation à Pretastore je commence à comprendre un peu mieux... C'est trés performant ! J'aime assez.Mais je dois avouer que j'ai bien passé 3H à chercher le BON htaccess pour OVH et surtout pour que les images s'affichent lorsque le mode url rewriting est activé.C'est peut-etre basique pour certains, mais peut-être moins pour d'autres...Ci-dessous le code complet pour créer ce htaccess spécial url rewriting pour l'hébergeur OVH et ce, sans disfonctionnement.En espérant que celà puisse aider l'un d'entre vous.@++ SetEnv REGISTER_GLOBALS 0 SetEnv PHP_VER 5 # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] 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 ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$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 ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php Link to comment Share on other sites More sharing options...
Yann - Prestaplugins Posted August 25, 2010 Share Posted August 25, 2010 Voici le mien, sur un hébergement mutualisé PRO chez OVH.J'ai juste ajouté les variables propres à OVH, et la compression/cache (suggéré par le plugin pagespeed de firefox) SetEnv REGISTER_GLOBALS 0 SetEnv ZEND_OPTIMIZER 1 SetEnv MAGIC_QUOTES 0 SetEnv PHP_VER 5 AddOutputFilterByType DEFLATE text/javascript application/javascript text/css application/xhtml+xml text/html FileETag none Header set Cache-Control "max-age=2592000" Header set Cache-Control "max-age=604800" Header set Cache-Control "max-age=600" Header unset Cache-Control # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] 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 ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$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 ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php Link to comment Share on other sites More sharing options...
Odolyte Posted August 25, 2010 Share Posted August 25, 2010 Checker ce post également :http://www.prestashop.com/forums/viewthread/66249/configuration_et_utilisation_de_prestashop/resolu_probleme_visualisation_images_avec_option_url_simplifiee_activee Link to comment Share on other sites More sharing options...
fitovita Posted September 17, 2010 Share Posted September 17, 2010 escusez moi mais quand je met votre htaccess mon site n'est plus visible en ligneje comprend rien, comment mettre l'url rewriting, je suis chez ovh?????????????????????? Link to comment Share on other sites More sharing options...
Odolyte Posted September 17, 2010 Share Posted September 17, 2010 Tu vas dan le menu outil > générateurs et tu choisis de générer le .htaccess.Ensuite si tu es chez OVH en mutualisé, il te faut rajouter en haut : # URL rewriting module activation RewriteEngine on pour activer l'URL rewriting. Link to comment Share on other sites More sharing options...
fitovita Posted September 17, 2010 Share Posted September 17, 2010 ah ok ds le htaccess que prestashop m'a généréds celui qu'il me génére il n'y a pas plus le SetEnv PHP_VER 5 en hautje le rajoute aussi? Link to comment Share on other sites More sharing options...
fitovita Posted September 17, 2010 Share Posted September 17, 2010 dans les 2 cas ça marche pasmais quand prestashop me génére mon htaccess, y'a pas les lignes de redirection qu'il y a ds les htaccess plus haut de ce sujety'a rien dedans, juste quelques lignes avec "htaccess généré par prestashop" Link to comment Share on other sites More sharing options...
Odolyte Posted September 17, 2010 Share Posted September 17, 2010 tu es en mutu ou dédié?t'as quoi comme erreur d'affichée ? Link to comment Share on other sites More sharing options...
fitovita Posted September 17, 2010 Share Posted September 17, 2010 le site disparait, et y'a plus qu'une page blancheje suis en mutualisé OVH, comme des milliers de personnes il devrait pas y avoir de problèmes Link to comment Share on other sites More sharing options...
Yann - Prestaplugins Posted September 17, 2010 Share Posted September 17, 2010 Les lignes sont liés au fait qu'on ait activé l'url rewriting dans notre boutique. Link to comment Share on other sites More sharing options...
fitovita Posted September 17, 2010 Share Posted September 17, 2010 oui je suis con il fallait activer avant et mettre le php5 en hautça fonctionne www.freecapsule.com Link to comment Share on other sites More sharing options...
oakjan Posted September 19, 2010 Share Posted September 19, 2010 Bonjour à tous , Je suis aussi chez ovh en mutualiséEt prestashop 1.2.5quand j'active l URL simplifié , j'ai un probleme bizarre , la navigation plante si j'essaye de changer de page uniquement si je suis déjà sur une page produit , et ca ne le fais pas tant que je suis en dehors d un produit .ca m'affiche :La page que vous avez demandée n’existe plusvoir mon post :http://www.prestashop.com/forums/viewthread/69523/configuration_et_utilisation_de_prestashop/la_page_que_vous_avez_demandee_nexiste_plus'>http://www.prestashop.com/forums/viewthread/69523/configuration_et_utilisation_de_prestashop/la_page_que_vous_avez_demandee_nexiste_plusmon fichier htaccess :Mon fichier htaccess est :SetEnv REGISTER_GLOBALS 0SetEnv PHP_VER 5 1. .htaccess automaticaly generated by PrestaShop e-commerce open-source solution 2. http://www.prestashop.com – http://www.prestashop.com/forums 1. URL rewriting module activation RewriteEngine on 1. URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-])\.html(.)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-])(.)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] 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 ^content/([0-9]+)\-([a-zA-Z0-9-])(.)$ /cms.php?id_cms=$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 ^lang-([a-z]{2})/(.)$ /$2?isolang=$1 [QSA,L,E] 1. Catch 404 errors ErrorDocument 404 /404.phpMerci d'avance pour toute aide Link to comment Share on other sites More sharing options...
lucwebsite Posted February 28, 2011 Share Posted February 28, 2011 Fantastic...worked for me perfectly with prestashop_1.3.7.0 version in my UKAN Shop website!Cheers!!! SetEnv REGISTER_GLOBALS 0SetEnv ZEND_OPTIMIZER 1SetEnv MAGIC_QUOTES 0SetEnv PHP_VER 5AddOutputFilterByType DEFLATE text/javascript application/javascript text/css application/xhtml+xml text/htmlFileETag noneHeader set Cache-Control "max-age=2592000"Header set Cache-Control "max-age=604800"Header set Cache-Control "max-age=600"Header unset Cache-Control# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution# http://www.prestashop.com - http://www.prestashop.com/forums# URL rewriting module activationRewriteEngine on# URL rewriting rulesRewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E]RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E]RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E]RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E]RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E]RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E]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 ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$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 ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E]# Catch 404 errorsErrorDocument 404 /404.php Link to comment Share on other sites More sharing options...
Rémy Posted April 11, 2011 Share Posted April 11, 2011 Bonjour,Moi je suis en dédié "Kimsufi" et quand je colle le code ci-dessous dans mon htaccess, plus rien n'est visible... SetEnv REGISTER_GLOBALS 0 SetEnv PHP_VER 5 # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] 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 ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$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 ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php 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