sachelo69 Posted November 8, 2012 Share Posted November 8, 2012 (edited) Ciao a tutti. Dopo aver attivato i friendly url non vedo più le immagini dei miei prodotti nel FO. Disattivando i friendly url le immagini ritornano visibili. Ho notato che con i friendly url attivi le mie immagini hanno questo collegamento che credo sia sbagliato. http://www.zerbinand...ada-marrone.jpg Quando credo debba essere differente. ecco le mie configurazioni del server: Informazioni sul server Informazioni sul server: Linux #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 Versione software server: nginx/1.2.4 Versione di PHP: 5.3.10-1ubuntu3.4 Limite memoria: 128M Tempo di esecuzione massimo: 30 Informazioni datatbase Versione di MySQL: 5.5.24-0ubuntu0.12.04.1 Motore MySQL: InnoDB Prefisso Tavole: ps_ Ecco invece il mio file .htaccess spero sia corretto: # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> # Disable Multiviews Options -Multiviews RewriteEngine on RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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} ^www.zerbinando.com$ 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] RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^www.zerbinando.com$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Edited November 8, 2012 by sachelo69 (see edit history) Link to comment Share on other sites More sharing options...
Gehasia Posted November 13, 2012 Share Posted November 13, 2012 (edited) Hi, you seems to be running on Nginx, and those rules are for Apache Httpd !! Nginx does not load .htaccess file, those kind of files are performance killers, and nginx wants to stay performant. Rewrite rules has to be written in the website configuration under your nginx configuration folder. I made a post for prestashop 1.5 rules here : http://www.prestasho...-prestashop-15/ Another one by another person : http://www.prestasho...y-url-in-nginx/ Edited November 13, 2012 by Gehasia (see edit history) 1 Link to comment Share on other sites More sharing options...
alsitn Posted February 19, 2013 Share Posted February 19, 2013 @Gehasia Thanks for pointing me in the right direction! 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