luisvillacrez Posted October 7, 2012 Share Posted October 7, 2012 Ok so far this is what i have figured out. Right now my website: www.lazux.com is running with the .htaccess generated by prestahop. Some of the links work except the my account link, login, and such. I have tried this solutions: http://prestashop-godaddy.blogspot.com/2009/02/how-to-get-prestashop-friendly-url-url.html Nothing. However, after trying all solution I decided to delete the .htacces so see if prestahop will generate another one. While the url friendly is enabled. Doing this, all the links work;However, all the images from the product don't show up . Server information Server information: Linux #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 Server software version: Apache PHP version: 5.2.17 Memory limit: 64M Max execution time: 30 Database information MySQL version: 5.0.92-log MySQL engine: InnoDB Tables prefix: ps_ Store information Prestashop version: 1.5.1.0 Shop URL: http://lazux.com/ Current theme in use: default Mail configuration Mail method: You are using the PHP mail() function. Your information Your web browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4 Current/Original .HTACCESS [/color][/size][/font][color=#585A69][font=Arial, Verdana, Helvetica, sans-serif][size=3] # ~~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[/size][/font][/color] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]<IfModule mod_rewrite.c>[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteEngine on[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{HTTP_HOST} ^lazux.com$[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteRule . - [E=REWRITEBASE:/][/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L][/color][/size][/font][color=#585A69][font=Arial, Verdana, Helvetica, sans-serif][size=3] # Images RewriteCond %{HTTP_HOST} ^lazux.com$ RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^lazux.com$ RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lazux.com$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lazux.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} ^lazux.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} ^lazux.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} ^lazux.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} ^lazux.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} ^lazux.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} ^lazux.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} ^lazux.com$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^lazux.com$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L][/size][/font][/color] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]# Dispatcher[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{REQUEST_FILENAME} -s [OR][/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{REQUEST_FILENAME} -l [OR][/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{REQUEST_FILENAME} -d[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{HTTP_HOST} ^lazux.com$[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteRule ^.*$ - [NC,L][/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteCond %{HTTP_HOST} ^lazux.com$[/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L][/color][/size][/font] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]</IfModule>[/color][/size][/font][color=#585A69][font=Arial, Verdana, Helvetica, sans-serif][size=3] #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404[/size][/font][/color] [font="Arial, Verdana, Helvetica, sans-serif"][size="2"][color="#585a69"]# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again[/color][/size][/font][color=#585A69][font=Arial, Verdana, Helvetica, sans-serif][size=3] Please if anyone know the solutions for the URL friendly to work on my site I would really appreciate it. Thank you in advanced. Link to comment Share on other sites More sharing options...
luisvillacrez Posted October 7, 2012 Author Share Posted October 7, 2012 Anyone? Link to comment Share on other sites More sharing options...
a21989 Posted October 8, 2012 Share Posted October 8, 2012 Anyone? I also met this issue, after I upgrade from 15.17 to v 1.5.1 it sucks, I tried many ways, no one work, dont know why they release such a terrible version as a stable one... Link to comment Share on other sites More sharing options...
digitalRoots Posted October 10, 2012 Share Posted October 10, 2012 http://www.prestashop.com/forums/topic/192951-solved-url-rewriting-mod-rewrite-is-not-active-on-your-server-using-cgifastcgi/ If you run PHP in CGI/FastCGI mode, PS does not detect it. Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 i have similiar problems before, when image not show up, you can check rewritebase option in the .htaccess Link to comment Share on other sites More sharing options...
nanopresta Posted October 10, 2012 Share Posted October 10, 2012 This is how I have my htaccess which has done a good job for me after lots of painstaking research. Hope this helps. # enable symbolic links Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / </IfModule> # ~~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 RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.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$ 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.yourwebsite.com$ RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ 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.yourwebsite.com$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^.*$ index.php [NC,L] </IfModule> <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> #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 <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] </IfModule> example-htaccess.txt Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 hi nanopresta, which part you modify so we can easily change/add ? Link to comment Share on other sites More sharing options...
nanopresta Posted October 10, 2012 Share Posted October 10, 2012 hi nanopresta, which part you modify so we can easily change/add ? # enable symbolic links Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / </IfModule> add this above #~~start~~ add this between first <IfModule mod_rewrite.c> # Disable Multiviews Options -Multiviews and RewriteEngine on <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] </IfModule> add this code to get youtube to work at the bottom below # ~~end~~ Link to comment Share on other sites More sharing options...
vynx Posted October 11, 2012 Share Posted October 11, 2012 (edited) Hi Nanopresta, i think we can add another modification, when user type domain.com without www. its also make some issue in the cookie, i also do some modification to redirect from domain.com to www.domain.com Edited October 11, 2012 by vynx (see edit history) Link to comment Share on other sites More sharing options...
nanopresta Posted October 11, 2012 Share Posted October 11, 2012 Hi Nanopresta, i think we can add another modification, when user type domain.com without www. its also make some issue in the cookie, i also do some modification to redirect from domain.com to www.domain.com That configuration is dependent on the Set shop URL in the Preferences, SEO & URLs page So make sure the way it is set on that page is the way it is set in the htaccess. Link to comment Share on other sites More sharing options...
vynx Posted October 11, 2012 Share Posted October 11, 2012 That configuration is dependent on the Set shop URL in the Preferences, SEO & URLs page So make sure the way it is set on that page is the way it is set in the htaccess. there is some bug in PS 1.5.1 about cookie, dont know in where in coding, but when make domain.com redirect to www.domain.com, then everything becomes better ... Link to comment Share on other sites More sharing options...
nanopresta Posted October 11, 2012 Share Posted October 11, 2012 It should be said that the reason I needed to make these changes was to get the URL rewrite to work properly as well as the pages to load correctly like log in page and my configuration is ( Server information Server information: Linux #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 Server software version: Apache PHP version: 5.2.17 Memory limit: 64M Max execution time: 30 Database information MySQL version: 5.0.92-log MySQL engine: InnoDB Tables prefix: mydb_ Store information Prestashop version: 1.5.0.17 Shop URL: https://www.mywebsite.com/ Current theme in use: default Mail configuration Mail method: You are using the PHP mail() function. Your information Your web browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4) One change I made this morning and this was found out after a day when the htaccess file rewrote itself. I made this modification to the code. after # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Put <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] # Disable Multiviews Options -Multiviews </IfModule> after updating the file on your server then go to Advanced Parameters/ performance Force Compile and X cache SAVE then then select Never compile cache and Cache Should be enabled except for debugging. then SAVE Also make sure Apache optimization is checked on same page. Link to comment Share on other sites More sharing options...
nanopresta Posted October 11, 2012 Share Posted October 11, 2012 there is some bug in PS 1.5.1 about cookie, dont know in where in coding, but when make domain.com redirect to www.domain.com, then everything becomes better ... I went back to 1.5.0.17 because of a few weird bugs in 1.5.1 (Just FYI) Link to comment Share on other sites More sharing options...
vynx Posted October 11, 2012 Share Posted October 11, 2012 It should be said that the reason I needed to make these changes was to get the URL rewrite to work properly as well as the pages to load correctly like log in page and my configuration is ( Server information Server information: Linux #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 Server software version: Apache PHP version: 5.2.17 Memory limit: 64M Max execution time: 30 Database information MySQL version: 5.0.92-log MySQL engine: InnoDB Tables prefix: mydb_ Store information Prestashop version: 1.5.0.17 Shop URL: https://www.mywebsite.com/ Current theme in use: default Mail configuration Mail method: You are using the PHP mail() function. Your information Your web browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4) One change I made this morning and this was found out after a day when the htaccess file rewrote itself. I made this modification to the code. after # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Put <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] # Disable Multiviews Options -Multiviews </IfModule> after updating the file on your server then go to Advanced Parameters/ performance Force Compile and X cache SAVE then then select Never compile cache and Cache Should be enabled except for debugging. then SAVE Also make sure Apache optimization is checked on same page. x cache is not available in some hosting, i think it only available in VPS ... I went back to 1.5.0.17 because of a few weird bugs in 1.5.1 (Just FYI) what weird bug in 1.5.1 that you know? Link to comment Share on other sites More sharing options...
luisvillacrez Posted October 11, 2012 Author Share Posted October 11, 2012 This is how I have my htaccess which has done a good job for me after lots of painstaking research. Hope this helps. # enable symbolic links Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / </IfModule> # ~~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 RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.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$ 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.yourwebsite.com$ RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ 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.yourwebsite.com$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^.*$ index.php [NC,L] </IfModule> <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> #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 <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] </IfModule> Thank you for trying to help. However, it is still not working. I called the guys from prestashop technical support. They don't even know what's wrong. Also, they didn't even have an 1.5.1 available to check on their servers. Lol You would think after making a huge update they would already have it testing huh? Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 11, 2012 Share Posted October 11, 2012 Hello luisvillacrez, for your htaccess issue with GoDaddy servers, it may be running in FastCGI mode. Check out this thread and see if it helps. http://www.prestashop.com/forums/topic/192951-solved-url-rewriting-mod-rewrite-is-not-active-on-your-server-using-cgifastcgi/ Link to comment Share on other sites More sharing options...
nanopresta Posted October 11, 2012 Share Posted October 11, 2012 x cache is not available in some hosting, i think it only available in VPS ... what weird bug in 1.5.1 that you know? I downloaded the new Prestashop 1.5.1, loaded it to my server, and completed the install. I had some problems with this version. The prices would not change when attributes were selected, and the product customization would not save. Because of this the product could not be added to the cart. I also encountered a problem with the mulit store feature, there was not a way to edit an additional root category unless you deactivate multi store feature and then reactivate multi store feature??? Not sure why that happens that way. Unfortunately I have to delete 1.5.1 for now and install 1.5.0.17 which is working on my other domain. By the way this is my first post only because I usually dont post in this forum because I can usually find a solution here by investigating forum topics and I would guess that this released version 1.5.1 is so new that it is not able to be investigated. That was my post in another topic. Link to comment Share on other sites More sharing options...
luisvillacrez Posted October 12, 2012 Author Share Posted October 12, 2012 Hello luisvillacrez, for your htaccess issue with GoDaddy servers, it may be running in FastCGI mode. Check out this thread and see if it helps. http://www.prestasho...ing-cgifastcgi/ Hey thank for trying help. However, I still getting the error It's been over a week. I have called presta customer service, they haven't be able to resolve my problem either. The gave me a solution to change hosting company. which is a pain in the butt. There;s gotta be something else. If anyone know please help. I'm using the last stable version of prestashop 1.5.1 and my hosting is godaddy. lol Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 12, 2012 Share Posted October 12, 2012 Hello, I'm not sure if it is so much of a "pain in the butt" technically. It's just a change in the DNS. It depends on each situation, I think everybody here would Agree that BlueHost is a good Hosting Provider that we support because of it's speed, low price, and compatbility with our features like url_rewriting. www.bluehost.com/prestashop I have actually overseen the migration over 30 merchants to BlueHost, from start to finish. 100% of them were happy with the switch. personally, we seldom receive call backs from them unless it's to say thank you and hello Link to comment Share on other sites More sharing options...
vynx Posted October 12, 2012 Share Posted October 12, 2012 Hi Ben, is bluehost using version 1.5.1 or previous version? Link to comment Share on other sites More sharing options...
Neffis Posted October 14, 2012 Share Posted October 14, 2012 For people who have error 500 and unable to run website with "Friendly URL on". Try to manually add "RewriteBase /" line after "RewriteEngine on" in your .htaccess file For me it helps! Link to comment Share on other sites More sharing options...
Rhapsody Posted October 15, 2012 Share Posted October 15, 2012 in Prestashop version 1.4 in the BO under Tools tab there was "Generators" where you can create the .htaccess file. Does anyone know where this function is in the BO of 1.5? Link to comment Share on other sites More sharing options...
vynx Posted October 15, 2012 Share Posted October 15, 2012 in PS 1.5 htaccess auto generate. Link to comment Share on other sites More sharing options...
Rhapsody Posted October 15, 2012 Share Posted October 15, 2012 in PS 1.5 htaccess auto generate. So this means you can no longer add in specific configuration info for .htacces via the BO like you could in version 1.4? That is an inconvenience if people now need to use an FTP client or control panel to make the edits. Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 15, 2012 Share Posted October 15, 2012 Hello Rhapsody, You can "force" the generation of an htaccess file by toggling the Friendly URL option in 1.5 @vynx, BlueHost has version 1.5 in their simple script. Link to comment Share on other sites More sharing options...
Rhapsody Posted October 15, 2012 Share Posted October 15, 2012 Thanks Benjamin. Should I submit a feature request on the bug tracker to bring back the manual .htaccess generator with edit capability similar to version 1.4, or do you think that version 1.5 eliminates this need? Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 15, 2012 Share Posted October 15, 2012 Hello Rhapsody, I believe that you should submit a feature request if you want. Surely it is important to you so why not. If you know how to force the generation, it should act the same as a designated button. Having the button did confuse some users. Link to comment Share on other sites More sharing options...
Rhapsody Posted October 15, 2012 Share Posted October 15, 2012 Hello Rhapsody, I believe that you should submit a feature request if you want. Surely it is important to you so why not. If you know how to force the generation, it should act the same as a designated button. Having the button did confuse some users. Done - enhancement request PSCFV-4999 posted at this link Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 15, 2012 Share Posted October 15, 2012 Hello Rhapsody, thank you for this request. We appreciate the feedback Thanks for choosing PrestaShop! Link to comment Share on other sites More sharing options...
ivonnep Posted April 2, 2013 Share Posted April 2, 2013 This is how I have my htaccess which has done a good job for me after lots of painstaking research. Hope this helps. # enable symbolic links Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / </IfModule> # ~~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 RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.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$ 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.yourwebsite.com$ RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ 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.yourwebsite.com$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^www.yourwebsite.com$ RewriteRule ^.*$ index.php [NC,L] </IfModule> <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> #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 <IfModule mod_rewrite.c> RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L] </IfModule> Wooohoo I've been trying for hours to solve this to no avail... until I found your post... at the beginning I didn't change "www.yourwebsite.com" address and nothing was working, and then I realized the mistake and now my site is up and running fine! friendly urls and with godaddy hosting!!! Link to comment Share on other sites More sharing options...
joannaleng Posted June 9, 2013 Share Posted June 9, 2013 Hi, I did not want to confuse clients and have error links by enabling other languages except english. Upon doing so, my URLs was changed from /en/product ID to /product id. However URLs on my website does not update the change and I have now broken links like: http://www.francesca...rowse-all-items on my store front here: http://screencast.com/t/uyRNSDHuB6z appreciate any help! Link to comment Share on other sites More sharing options...
Recommended Posts