// cleanup

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15608 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean committed 2012-05-22 10:10:08 +00:00
1 parent 534b4facb2
commit 59e29fad75
1 file changed
+8 -11
+8 -11
View File
@@ -276,20 +276,17 @@ class ShopCore extends ObjectModel
if ($id_shop && !$is_main_uri) if ($id_shop && !$is_main_uri)
{ {
foreach ($results as $row) foreach ($results as $row)
{
if ($row['id_shop'] == $id_shop && $row['main']) if ($row['id_shop'] == $id_shop && $row['main'])
{ {
$main_uri = $row['uri']; // extract url parameters
break; $request_uri = substr($request_uri, strlen($found_uri));
}
if (isset($main_uri))
{
// extract url parameters
$request_uri = substr($request_uri, strlen($found_uri));
header('HTTP/1.1 301 Moved Permanently'); header('HTTP/1.1 301 Moved Permanently');
header('Cache-Control: no-cache'); header('Cache-Control: no-cache');
header('location: http://'.$row['domain'].$main_uri.$request_uri); header('location: http://'.$row['domain'].$row['uri'].$request_uri);
exit; exit;
}
} }
} }
} }