Hi,
I have a couple of years old web shop with only one product in each category.
Could anyone please tell me if this "redirect-code" (or what it is) below would hurt my SEO?
The code will be in the category.php file in my Prestashop 1.4-shop
if ($category->id != 1 && is_object($cookie) && strpos($_SERVER['HTTP_USER_AGENT'],'bot') === false && strpos($_SERVER['HTTP_USER_AGENT'],'baidu') === false && strpos($_SERVER['HTTP_USER_AGENT'],'spider') === false && strpos($_SERVER['HTTP_USER_AGENT'],'Ask Jeeves') === false && strpos($_SERVER['HTTP_USER_AGENT'],'slurp') === false && strpos($_SERVER['HTTP_USER_AGENT'],'crawl') === false) { $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); $nbProducts = $category->getProducts(NULL, NULL, NULL, $orderBy, $orderWay, true); if ($nbProducts == 1) { $cat_products = $category->getProducts(intval($cookie->id_lang), 1, 1, $orderBy, $orderWay); foreach ($cat_products AS $product) { Header( "Location: ".$product['link']); exit; } } }
Thanks!