From e83da1f23be684ed374a71afba18235cecb8e9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Wed, 3 Apr 2013 14:43:17 +0200 Subject: [PATCH] [-] BO: Fix the Htaccess rewriting generation when one shop has the rewriting enabled and the last one on the same domain not --- classes/Tools.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Tools.php b/classes/Tools.php index 6ca5b9cd9..be7bff80b 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1598,8 +1598,10 @@ class ToolsCore // Webservice fwrite($write_fd, 'RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]'."\n\n"); - - $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS', null, null, (int)$uri['id_shop']); + + if (!$rewrite_settings) + $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS', null, null, (int)$uri['id_shop']); + $domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n"; // Rewrite virtual multishop uri if ($uri['virtual'])