From 8398c73e1277c43aca46f92c5b088b4500c8b790 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 22 May 2012 09:46:26 +0000 Subject: [PATCH] // fix redirection git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15604 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/shop/Shop.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 4c5e29686..4b074558f 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -281,14 +281,16 @@ class ShopCore extends ObjectModel $main_uri = $row['uri']; break; } + if (isset($main_uri)) + { + // extract url parameters + $request_uri = substr($request_uri, strlen($found_uri)); - // extract url parameters - $request_uri = substr($request_uri, strlen($found_uri)); - - header('HTTP/1.1 301 Moved Permanently'); - header('Cache-Control: no-cache'); - header('location: http://'.$row['domain'].$main_uri.$request_uri); - exit; + header('HTTP/1.1 301 Moved Permanently'); + header('Cache-Control: no-cache'); + header('location: http://'.$row['domain'].$main_uri.$request_uri); + exit; + } } }