ChurchPath Posted July 22, 2009 Share Posted July 22, 2009 Hi everyone,Am using v1.2.. and when i turn friendly-urls on in the admin area and preview I only see placeholders instead of the images in the products.Can anyone advise please?ChurchPath. Link to comment Share on other sites More sharing options...
glosticks Posted July 22, 2009 Share Posted July 22, 2009 Have you tried regenerating the thumbnailsregardsChris Link to comment Share on other sites More sharing options...
ChurchPath Posted July 22, 2009 Author Share Posted July 22, 2009 Hi Chris,Yes I have, it's seems to be a problem with the path that points to the product images.It creates the friendly-url ok but it's just that I then can't see the actual thumbnail images.When I turn off 'friendly-urls' they display fine again.It's very frustrating but thanks for your reply.regards,ChurchPath. Link to comment Share on other sites More sharing options...
Snol Posted July 22, 2009 Share Posted July 22, 2009 Have a look at your .htaccess file, your image rewrites should have the correct slashes / and \RewriteRule ^([0-9]+)\-([0-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]as long as your site is not in subfolder, if in subfolder then you will need that name toogood luckJohn Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 Dear all,I'm also using version 1.2.0.5 and my product images are not displaying. I have looked in my img/p directory and all the thumbnails are there, as expected. I've added Snol's lines to my .htaccess and restarted Apache, cleared my cache, cleared cookies and still no porducte images. I am running a development install of PS on my localhost on a Windows OS and my PS install is in my server's root dir. I wonder, ChurchPath, if you've resolved this for your install and if so if you could please post your solution?Best,Meg Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 Do yours work if you turn friendly URL off Meg?John Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 Hi John, Thanks for your quick reply. Yes, they do indeed display when I turn friendly off. I am stumped. The image file names all look correct and the rest of the links are working as expected.Meg Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 copy all of your .htaccess and paste it here or pm meJohn Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 My .htaccess:# URL rewriting module activationRewriteEngine on# URL rewriting rulesRewriteRule ^([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 ^([0-9]+)\-([0-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]# Catch 404 errorsErrorDocument 404 /404.phpMy PrestaShop install directory:C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashopAnd img dir:C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\imgI can confirm that LoadModule rewrite_module modules/mod_rewrite.so is uncommented in my httpd.confThis has to be something blindly obvious that I'm just not seeing - be kind won't you? Meg Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 Please note the numbers bulleting my .htaccess entries were added on submission of my reply and are not in my file.Meg Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 They are in fact comments using hash marks.Right, thanks for your help!Meg Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 did you get prestashop to automatically generate the .htaccess file Meg, preferences/friendly URLs/click generate a .htaccess file and use that.also for reference my .htaccess is this as below# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution# http://www.prestashop.com - http://www.prestashop.com/forums# URL rewriting module activationRewriteEngine onAddType x-mapp-php5 .php# URL rewriting rulesRewriteRule ^([0-9]+)\-([0-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 ^([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]# Catch 404 errorsErrorDocument 404 /404.phpremeber backup..backup..backup any files you are going to change. Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 dont forget you must have friendly URL enabled BEFORE you generate the .htaccess fileJohn Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 They are in fact comments using hash marks.Right, thanks for your help!Meg yes the bullet thing happens both ways.try each .htaccess when you move to live server you may need to add / on each line dependaent on if you will be in subfolder or not Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 Oh goodness. I knew it was something ridiculously obvious. I didn't realise there was a link to generate the file. I thought I had to 'generate' the file with my own entries. Indeed, the .htacess I've just generated through the CMS is working just fine. Gracious, how embarassing. Thanks for your help.Oh, yes, I use SVN and live to 'revert' my cock ups Thanks again,Meg Link to comment Share on other sites More sharing options...
Snol Posted July 28, 2009 Share Posted July 28, 2009 whhay heeeywell done Link to comment Share on other sites More sharing options...
megsmitley Posted July 28, 2009 Share Posted July 28, 2009 Great, thanks ever so for your help. Hopefully I'll manage much more competently when I go live.Thanks,Meg Link to comment Share on other sites More sharing options...
selman Posted July 30, 2009 Share Posted July 30, 2009 dont forget you must have friendly URL enabled BEFORE you generate the .htaccess fileJohn This was the key. Fixed Thank you Snol.. Link to comment Share on other sites More sharing options...
thecolourbrown Posted September 12, 2009 Share Posted September 12, 2009 dont forget you must have friendly URL enabled BEFORE you generate the .htaccess fileJohn Thanks so much for writing that suggestion - you just saved me from going nuts!! Link to comment Share on other sites More sharing options...
Prinfor Posted April 24, 2010 Share Posted April 24, 2010 did you get prestashop to automatically generate the .htaccess file Meg, preferences/friendly URLs/click generate a .htaccess file and use that.also for reference my .htaccess is this as below# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution# http://www.prestashop.com - http://www.prestashop.com/forums# URL rewriting module activationRewriteEngine onAddType x-mapp-php5 .php# URL rewriting rulesRewriteRule ^([0-9]+)\-([0-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 ^([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]# Catch 404 errorsErrorDocument 404 /404.phpremeber backup..backup..backup any files you are going to change. Can you please help me? I have this htacess:# .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$ /publico/img/p/$1-$2$3.jpg [L,E]RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /publico/img/c/$1$2.jpg [L,E]RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /publico/product.php?id_product=$3&isolang;=$1$5 [L,E]RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /publico/product.php?id_product=$2&isolang;=$1$4 [L,E]RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /publico/category.php?id_category=$2&isolang;=$1 [QSA,L,E]RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /publico/product.php?id_product=$2$4 [L,E]RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /publico/product.php?id_product=$1$3 [L,E]RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /publico/category.php?id_category=$1 [QSA,L,E]RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /publico/cms.php?id_cms=$1 [QSA,L,E]RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /publico/supplier.php?id_supplier=$1$3 [QSA,L,E]RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /publico/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]RewriteRule ^lang-([a-z]{2})/(.*)$ /publico/$2?isolang=$1 [QSA,L,E]# Catch 404 errorsErrorDocument 404 /publico/404.phpBut somehow some pictures tha majority did not show, thanks in advance Link to comment Share on other sites More sharing options...
Recommended Posts