Jump to content

Friendly URL


Recommended Posts

Hi,

So I have the problem when I turn friendly URLS on my images don't work for the products. My hosting company say everything is fine their side (mod_rewrite activated etc) so must be prestashop. How can I solve this? The images point to locations like http://joovuu.com/store/31-large_default/polaroid-300-instant-camera-black.jpg which of course don't exist. I've tried regenerating thumbnails etc and nothing changes. Any help? my website is www.joovuu.com thank you!

Dan

Link to comment
Share on other sites

for thie first, you should try to regenerate htaccess manually, just log in to your ftp service, go to prestashop root dir and remove the .htaccess file - then reload your shop frontpage.

 

dont forget about backup of this file

Link to comment
Share on other sites

Can you check if you turned on the correct option for your preferences->images:

Check if you checked' (i.e. turned ON) the option:

 

large_default/Products

in the grid?

 

I think this should be set to on. Please check and try.

 

My 2 cents,

pascal

Link to comment
Share on other sites

  • 7 months later...

Djaenicke..I want to share my experience about this problem. I have done most of things suggested by the expert here.thanks for all. But, it does  not work until I re-upload the image one by one. I undeliberately find that when I create new product, the image shows properly so I delete my old product image one by one. This works eventhough it hurts me lol. I have no other idea for that   

Link to comment
Share on other sites

Hi xanda,

Can you check if the path to the (not showing) picture BEFORE re-uploading is the same as the path to the (now showing) picture AFTER re-uploading? What is/are the path(s)?

Any chance you can share a link to your site, and a link to a non-showing picture?

 

Pascal

Link to comment
Share on other sites

  • 2 months later...

Hi

 

Just wanted to add my 2 bits :

 

In the apache directives, under the Directory section, AllowOverride has to be set to All to let apache read the htaccess file, otherwise it is totally ignored. This is for those who have access to their own servers.

Link to comment
Share on other sites

  • 2 years later...

Same problem and nothing works in my new prestashop store

I've already regenerate htaccess and thumbnails, turn off on friendly url's, delete all old product's and make new, with new image, regenerate thubm.

images have strange url: www.mysite/12-medium_default/test-product.jpg

If i turn off seo-url, than all image works fine ( www.mysite/img/p/1/2/12-medium_default.jpg), except admin panel, i cant access them by simple url:  mysite/admin

I try two ways for adding image: 1) csv import with links for every product 2) uploading in product info panel

Prestashop 1.6.1.7,  nginx1.10 +fpm

Link to comment
Share on other sites

  • 2 months later...

Sorry for refreshing this topic, but i will just give You a tip that can help other users that issue the same problem (like me). All tips given below didn't helped. This will probably help You if You use Your own server for hosting.

 

You have to change in Your apache config following things:

 

1. Make sure if You have mod rewrite properly enabled, just to be sure type in command prompt:
sudo a2enmod rewrite

 

then restart Your apache server
sudo service apache2 restart

 

2. Make sure that in Your apache config file (in my case /etc/apache2/apache2.conf) You have enabled Overriding in <Directory/> section. If You have set to None, change it to All.

 

AllowOverride All

 

IMPORTANT, make sure that You have this option enabled also in other sections related to Your shop. In my case there was also section <Directory /var/www/ /> Where i keep my shop so it is required to change this value also in that place.

 

then restart Your apache server
sudo service apache2 restart

 

3. make sure that in Your directory where You keep shop you have file .htaccess and granted permissions.
To be sure set chmod 666 to this file

chmod 666 /path/to/shop/.htaccess

 

4. Disable friendly urls and enable again in Your shop panel, check if that helped

 

I hope that someone found it helpfull.

__
Kind Regds
MajkelD
 

 

Link to comment
Share on other sites

  • 9 months later...

Hi arturgns, i am facing the same issue as you and I now suspecting the rewrite rules are the issue.

 

Before friendly url - http://mydailysc.com/img/p/8/3/83-home_default.jpg

After friendly url -  http://mydailysc.com/83-home_default/ceramide-moist-cream.jpg

 

May I know what did you edit in the htaccess files ??

 

mine is currently as follow 

 

# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
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]
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]
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]
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]
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]
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]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
Link to comment
Share on other sites

  • 7 months later...
  • 10 months later...
  • 4 years later...
On 3/12/2019 at 7:25 PM, cherojo said:

does anyone find a solution?

Hello everyone. About the Friendly Url issues, i got a fast a pretty simple solution. 🙂

Of cours i also got the same problem when activating "Friendly Url", my products images wouldn't show any more. Here is the solution and i hope it would also help you all.

 

All you need to do is to Disable Apache's MultiViews option

-This is done by going in your admin panel and under this directory Traffic & SEO -> SEO & URLs, while scrolling, you will see "Set up URLs" box.

-Activate the "Disable Apache's MultiViews option" buttons

also (optionally) you can activate the " Disable Apache's mod_security module"  buttons

  

-Make sure that your Friendly URL Then save button is activated. Then Save.  

 -Go to your website home page and check the result. It worked fine for me and i hope it will also help you too.

 

 

image.thumb.png.c3e94e4f2cb8380dbb473b1394c50164.png

Edited by Dev237 (see edit history)
Link to comment
Share on other sites

  • 5 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...