From 2b23268bec0a1fde82f3fc051cb37007a3a0ef04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 25 Apr 2013 11:04:48 +0200 Subject: [PATCH] [-] BO: Fix htaccess generation for subfolders installation --- classes/Tools.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Tools.php b/classes/Tools.php index e0e91e3a1..765dfbf86 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1631,10 +1631,10 @@ class ToolsCore { fwrite($write_fd, $media_domains); fwrite($write_fd, $domain_rewrite_cond); - fwrite($write_fd, 'RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.'$1-$2$3$4.jpg [L]'."\n"); + fwrite($write_fd, 'RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L]'."\n"); fwrite($write_fd, $media_domains); fwrite($write_fd, $domain_rewrite_cond); - fwrite($write_fd, 'RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.'$1-$2$3.jpg [L]'."\n"); + fwrite($write_fd, 'RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L]'."\n"); } // Rewrite product images < 100 millions @@ -1649,7 +1649,7 @@ class ToolsCore $img_name .= '$'.$j; fwrite($write_fd, $media_domains); fwrite($write_fd, $domain_rewrite_cond); - fwrite($write_fd, 'RewriteRule ^'.str_repeat('([0-9])', $i).'(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.$img_path.$img_name.'$'.($j + 1).".jpg [L]\n"); + fwrite($write_fd, 'RewriteRule ^'.str_repeat('([0-9])', $i).'(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/'.$img_path.$img_name.'$'.($j + 1).".jpg [L]\n"); } fwrite($write_fd, $media_domains); fwrite($write_fd, $domain_rewrite_cond);