Jump to content

Problème url rewriting sous prestashop 1.4.7


Recommended Posts

Bonjour à toutes et à tous,

 

L'activation de l'url rewriting sous prestashop 1.4.7 me redirige fatalement sur le fatidique 404 ...

 

En retirant manuellement :

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

J'arrive à tout faire fonctionner, sauf, sauf l'accès par catégorie ... Flute ?

 

(hébergement chez phpnet)

 

Des idées, gentlemen ?

Link to comment
Share on other sites

  • 2 weeks later...
#Eviter le duplicate content - Mis automatiquement à chaque generation de htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^monsite.com [NC]
RewriteRule ^(.*) http://www.monsite.com/$1 [L,R=301]

<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},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>
# Catch 404 errors
ErrorDocument 404 /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>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

Link to comment
Share on other sites

#Eviter le duplicate content - Mis automatiquement à chaque generation de htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^monsite.com [NC]
RewriteRule ^(.*) http://www.monsite.com/$1 [L,R=301]

<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},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>
# Catch 404 errors
ErrorDocument 404 /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>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

 

Merci. Auriez vous un exemple d'URL qui ne marche pas ?

Link to comment
Share on other sites

Toutes les url réecrites des images des produits ne fonctionnent pas si je ne commente pas la ligne:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

De plus, le module Lengow n'arrive plus à récupérer mes données avec le webservice, ils me disent que c'est peut être un problème de htaccess.

Link to comment
Share on other sites

Toutes les url réecrites des images des produits ne fonctionnent pas si je ne commente pas la ligne:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

De plus, le module Lengow n'arrive plus à récupérer mes données avec le webservice, ils me disent que c'est peut être un problème de htaccess.

 

Donc, si vous "commentez" cette fameuse ligne, quelles fonctionnalités continuent à dysfonctionner? Lengow ? Aucune ?

Link to comment
Share on other sites

  • 2 months later...

Bonjour, problème exactement identique chez moi, sur prestashop 1.4.7.0

 

Si je commente la ligne indiquée par : robinos, cela fonctionne dans l'ensemble sauf pour le module : belvgbrandsandlogos

qui n'apprécie pas soit les URL Simplifiées, soit la mise en commentaire de cette ligne.

 

Je fais le tour au plus vite afin de remonter d'éventuels autres problèmes

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...