Jump to content

.htaccess /c/img/ RewriteRule Problems


Recommended Posts

Hello,

 

I am on Presta 1.4.8.2 and facing a problem with displaying image on my shop pages. The server running is Apache with mod_rewrite enabled and working on all other rewriterules.

 

On all Presta generated content pages, the system is trying to pull images from paths like:

/c/7-category/category-name-here.jpg

 

The correspondent rules in .htaccess are:

 

RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]

 

On the system, the files are actually located at /img/c/ ...

-rw-rw-r--  1 apache  apache 54967 May 22 00:21 7-category.jpg
-rw-rw-r--  1 apache  apache 53419 May 22 00:21 7.jpg
-rw-rw-r--  1 apache  apache 25728 May 22 00:21 7-large.jpg
-rw-rw-r--  1 apache  apache  2968 May 22 00:21 7-medium.jpg
-rw-rw-r--  1 apache  apache  1110 May 22 00:21 7-small.jpg

 

What would work as a fix?

Thanks in advance

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

×
×
  • Create New...