LeGhe Posted April 1, 2011 Share Posted April 1, 2011 Bonjour,Tout d'abord merci au team Prestashop pour cette petite merveille de 1.4, qui divise quand même mon temps de chargement par 3... Et encore, je n'ai pas encore optimisé avec les Yslow, pingdom & co.Bref.Le URL rewrite ne fonctionne pas du tout : la page est bien renommée, mais reste introuvable : La page que vous avez demandée n'existe plus.Mon .htaccess : SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 AddType x-mapp-php5 .php # URL rewriting module activation RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^autourdumonde.biz$ [NC] RewriteRule ^(.*)$ http://www.autourdumonde.biz/$1 [R=301,L] # 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] RewriteRule (index.html) index.php # MOD_DEFLATE COMPRESSION SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php #Pour les navigateurs incompatibles BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html #ne pas mettre en cache si ces fichiers le sont déjà SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip #les proxies doivent donner le bon contenu Header append Vary User-Agent env=!dont-vary # BEGIN Expire headers ExpiresActive On ExpiresDefault "access plus 7200 seconds" ExpiresByType image/jpg "access plus 2592000 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType image/gif "access plus 2592000 seconds" AddType image/x-icon .ico ExpiresByType image/ico "access plus 2592000 seconds" ExpiresByType image/icon "access plus 2592000 seconds" ExpiresByType image/x-icon "access plus 2592000 seconds" ExpiresByType text/css "access plus 2592000 seconds" ExpiresByType text/javascript "access plus 2592000 seconds" ExpiresByType text/html "access plus 7200 seconds" ExpiresByType application/xhtml+xml "access plus 7200 seconds" ExpiresByType application/javascript A259200 ExpiresByType application/x-javascript "access plus 2592000 seconds" ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" # END Expire headers # Catch 404 errors ErrorDocument 404 /404.php AddOutputFilterByType DEFLATE text/javascript application/javascript text/css application/xhtml+xml text/html # KILL THEM ETAGS Header unset ETag FileETag none # BEGIN Cache-Control Headers Header set Cache-Control "max-age=2592000, public" Header set Cache-Control "max-age=2592000, private" Header set Cache-Control "max-age=7200, public" # Disable caching for scripts and other dynamic files Header unset Cache-Control # END Cache-Control Headers Je galère... Merci ! Link to comment Share on other sites More sharing options...
jeckyl Posted April 1, 2011 Share Posted April 1, 2011 Bonjour,c'est le htaccess généré par la 1.4 ? Link to comment Share on other sites More sharing options...
LeGhe Posted April 1, 2011 Author Share Posted April 1, 2011 Non, car lorsque je cherche à le générer automatiquement, mon BO devient page blanche, et mon FO dit ça : Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homez.342/autourdum/www/product.php on line 29 Link to comment Share on other sites More sharing options...
jeckyl Posted April 1, 2011 Share Posted April 1, 2011 Vous avez bien endu mis ces lignes SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 dans l'espace libre prévu sur la 1.4 ?ou tout simplement en les rajoutant à la main après avoir généré le nouveau htaccess. Link to comment Share on other sites More sharing options...
LeGhe Posted April 1, 2011 Author Share Posted April 1, 2011 Ouf !! Une histoire d'* # URL rewriting module activation RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^autourdumonde.biz$ [NC] RewriteRule ^(.*)$ http://www.autourdumonde.biz/$1 [R=301,L] # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.png$ /img/p/$1-$2$3.png [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.png$ /img/c/$1$2.png [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] Normal que l'url rewrite allonge le temps d'affichage d'une page de manière significative ? Link to comment Share on other sites More sharing options...
stek Posted April 6, 2011 Share Posted April 6, 2011 Bonjour,J'ai eu le même soucis d'affichage de page blanche, la solution a en effet été de simplement rajouter au début du .htaccess les lignes suivantes:SetEnv PHP_VER 5SetEnv REGISTER_GLOBALS 0Merci! (est-ce que c'était précisé quelque part dans prestashop?) Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted April 14, 2011 Share Posted April 14, 2011 Oui, c'est précisé ici. PrestaShop doit être installé sur un serveur web. Configuration requise :- Linux, Unix, ou Windows- Serveur web (Apache 1.3 ou supérieur, IIS 6 ou supérieur)- PHP 5.0* ou supérieur- MySQL 5** ou supérieur Quant au SetEnv, il est propre à OVH. Il est expliqué dans leur guide. Link to comment Share on other sites More sharing options...
stek Posted April 15, 2011 Share Posted April 15, 2011 Pour un non spécialiste, configuration requise et ajout ou maintient de lignes dans le .htaccess ne sont pas forcément synonymes. Merci pour les explications. Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted April 15, 2011 Share Posted April 15, 2011 Effectivement ça n'a rien d'évident. À ma connaissance OVH est le seul hébergeur au monde à procéder comme ça. On comprend bien les avantages techniques (une fois votre site installé, la version de PHP ne change pas dans votre dos), mais c'est difficile pour le premier site.Mieux vaut utiliser PHP 5.3 au lieu de PHP 5.2. Il est sorti en 2009, il n'y a plus de défauts de jeunesse. La directive à mettre dans le .htaccess sera donc : SetEnv PHP_VER 5_TEST Onglet Outils / Générateurs, coller dans Configuration spécifiqueIl y a d'autres configurations possibles précisées ici. Par sécurité, il vaut mieux mettre register_globals à zéro, donc finalement : SetEnv PHP_VER 5_TEST SetEnv REGISTER_GLOBALS 0 Link to comment Share on other sites More sharing options...
sanselle Posted January 25, 2012 Share Posted January 25, 2012 J'ai le même problème je suis bloqué avec la version 1.4.6.2. Erreur de page quand je rajoute : RewriteCond %{HTTP_HOST} ^aucoeurdelenfance.com$ RewriteRule ^(.*) http://www.aucoeurdelenfance.com/$1 [QSA,L,R=301] Une idée? SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 <IfModule mod_rewrite.c> # URL rewriting module activation RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^aucoeurdelenfance.com$ RewriteRule ^(.*) http://www.aucoeurdelenfance.com/$1 [QSA,L,R=301] # URL rewriting rules RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L] RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2$3.jpg [L] RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L] RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /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$ /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$ /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$ /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$ /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$ /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$ /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$ /img/c/$1$2.jpg [L] RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L] RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L] RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L] RewriteRule ^page-non-trouvee$ /404.php [QSA,L] RewriteRule ^adresse$ /address.php [QSA,L] RewriteRule ^adresses$ /addresses.php [QSA,L] RewriteRule ^authentification$ /authentication.php [QSA,L] RewriteRule ^meilleures-ventes$ /best-sales.php [QSA,L] RewriteRule ^panier$ /cart.php [QSA,L] RewriteRule ^contactez-nous$ /contact-form.php [QSA,L] RewriteRule ^bons-de-reduction$ /discount.php [QSA,L] RewriteRule ^suivi-commande-invite$ /guest-tracking.php [QSA,L] RewriteRule ^historique-des-commandes$ /history.php [QSA,L] RewriteRule ^identite$ /identity.php [QSA,L] RewriteRule ^fabricants$ /manufacturer.php [QSA,L] RewriteRule ^mon-compte$ /my-account.php [QSA,L] RewriteRule ^nouveaux-produits$ /new-products.php [QSA,L] RewriteRule ^commande$ /order.php [QSA,L] RewriteRule ^details-de-la-commande$ /order-follow.php [QSA,L] RewriteRule ^commande-rapide$ /order-opc.php [QSA,L] RewriteRule ^avoirs$ /order-slip.php [QSA,L] RewriteRule ^mot-de-passe-oublie$ /password.php [QSA,L] RewriteRule ^promotions$ /prices-drop.php [QSA,L] RewriteRule ^recherche$ /search.php [QSA,L] RewriteRule ^plan-du-site$ /sitemap.php [QSA,L] RewriteRule ^magasins$ /stores.php [QSA,L] RewriteRule ^fournisseurs$ /supplier.php [QSA,L] </IfModule> 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