Example #1
0
 public function redirect($path = '', $useBaseUrl = true, $permanent = false)
 {
     $fullPath = $path;
     $config = Model3_Registry::get('config');
     $configData = $config->getArray();
     if ($configData['m3_internationalization']['inter_multilang'] == true) {
         $fullPath = $configData['m3_internationalization']['inter_default_lang'] . '/' . $path;
     }
     if ($useBaseUrl == true) {
         $fullPath = $this->_request->getBaseUrl() . '/' . $fullPath;
     }
     if ($permanent == true) {
         header("HTTP/1.1 301 Moved Permanently");
     }
     header('Location: ' . $fullPath);
     exit;
 }