sibrodo Posted February 1, 2015 Share Posted February 1, 2015 (edited) So i recently tried to use a media server to off load the HTTP request. my media server is http//s3.example.com I uploaded the following folders and its content: img themes Everything looks okay, my site still works properly except for one thing: I'm getting missing picture for all of my product image. I have tried the following: Turned off friendly URL --> then everything works like a charm. Product image can be displayed (but only when friendly URL is turned off. Regenerate thumbnails --> Still get missing image. Move image --> Still get missing image. Full url with "Friendly URL" turned on is: http://xx.bro.do/2579-product_list_default/langdon-parka-black.jpg With "Friendly URL" turned off, it becomes: http://xx.bro.do/img/p/2/5/7/9/2579-product_list_default.jpg So, somehow the "Friendly URL' is not being redirected properly to the "Unfriendly URL" Below is a snippets of my .htaccess # Images RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([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/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^xx.bro.do$ [OR] RewriteCond %{HTTP_HOST} ^brodo.dev$ RewriteRule ^([0-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/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] Can anyone help me with this? Why the product image is not loaded properly using friendly URL Edited February 1, 2015 by sibrodo (see edit history) 1 Link to comment Share on other sites More sharing options...
sibrodo Posted February 1, 2015 Author Share Posted February 1, 2015 Anyone knows why is this happening ? Link to comment Share on other sites More sharing options...
Austin M. Posted February 3, 2015 Share Posted February 3, 2015 Do the images actually exists on your application server? In order to use the "Media Server" feature of PrestaShop it seems you have to use a real CDN like AWS CloudFront. Then you'll set your application server as the origin for your CDN distribution. Link to comment Share on other sites More sharing options...
Recommended Posts