Pamgui2000 Posted Wednesday at 09:31 AM Share Posted Wednesday at 09:31 AM Bonjour à tous, je rencontre un souci avec les photos de mes produits, elle ne s'affichent pas quand l'id est supérieur à 8 chiffres Exemple : https://www.monsite.fr/10283750-home_default/nomdemonproduit.jpg = erreur 404 https://www.monsite.fr/img/p/1/0/2/8/3/7/5/0/10283750-large_default.jpg = ok quand je désactive les URL simplifiées, mes images s'affichent bien. Le htaccess a été régénéré, mais rien n'y fait. j'ai ajouté à la main dans mon htaccess RewriteCond %{HTTP_HOST} ^www.monsite.fr$ RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$9/$1$10 [L] Mais rien n'y fait.... Une idée ? Link to comment Share on other sites More sharing options...
Eolia Posted Wednesday at 09:39 AM Share Posted Wednesday at 09:39 AM ([\d])([\d])([\d])([\d])([\d])([\d])([\d]) <= je ne vois que 7 chiffres là, pas 8 Link to comment Share on other sites More sharing options...
Pamgui2000 Posted Wednesday at 09:52 AM Author Share Posted Wednesday at 09:52 AM (edited) J'ai trouvé la solution, il faut ajouter cela dans le htacces, apparemment Apache ne gère pas les id supérieur à 9999999 (c'est effectivement supérieur à 7 chiffres et non 8 comme indiqué dans mon titre...) RewriteRule ^0([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/0/$1/$2/$3/$4/$5/$6/$7/0$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^1([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/1/$1/$2/$3/$4/$5/$6/$7/1$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^2([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/2/$1/$2/$3/$4/$5/$6/$7/2$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^3([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/3/$1/$2/$3/$4/$5/$6/$7/3$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^4([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/4/$1/$2/$3/$4/$5/$6/$7/4$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^5([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/5/$1/$2/$3/$4/$5/$6/$7/5$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^6([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/6/$1/$2/$3/$4/$5/$6/$7/6$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^7([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/7/$1/$2/$3/$4/$5/$6/$7/7$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^8([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/8/$1/$2/$3/$4/$5/$6/$7/8$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^9([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/9/$1/$2/$3/$4/$5/$6/$7/9$1$2$3$4$5$6$7$8$9.jpg [L] Edited Wednesday at 09:55 AM by Pamgui2000 (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted Wednesday at 02:47 PM Share Posted Wednesday at 02:47 PM Vous avez des ID images qui commencent par 0 ??? Link to comment Share on other sites More sharing options...
Eolia Posted Wednesday at 04:27 PM Share Posted Wednesday at 04:27 PM Ce qui me surprend c'est que vous ayez plus de 9 millions d'images. Link to comment Share on other sites More sharing options...
Mediacom87 Posted Wednesday at 04:35 PM Share Posted Wednesday at 04:35 PM il y a 6 minutes, Eolia a dit : Ce qui me surprend c'est que vous ayez plus de 9 millions d'images. Et oui, cela s'appelle l'import massive et incontrôlée de produits et d'images inutiles. 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