public function brandRedirect() { if (empty($_GET['q'])) { return; } $slug = $_GET['q']; $brand = new Brand(); $brand->withSlug($slug); if ($brand->hasId()) { $brand->registerClick(); $this->gaBrandClickRegister($brand); header('Location: ' . $brand->url); exit; } }
} if (substr($queryString, -1) == '/') { $queryString = substr($queryString, 0, -1); } if (empty($queryString)) { Controller::exec('FindGuidelines', 'index'); } else { if ($queryString == 'download') { Controller::exec('FindGuidelines', 'download'); } else { if ($queryString == 'about') { Controller::exec('FindGuidelines', 'about'); } else { if (class_exists('AdministrationController') && $queryString == AdministrationController::DIRECTORY_ADMINISTRATION) { Controller::exec('administration', 'display'); } else { $brand = new Brand(); $brand->withSlug($queryString); if ($brand->hasId()) { Controller::exec('FindGuidelines', 'brandRedirect'); } else { Controller::exec('FindGuidelines', 'error404'); } } } } } } catch (Exception $e) { var_dump($e); echo 'Oups! Something do not work... :('; }