1) {// если не главная страница... if (rtrim($uri,'/')!=$uri) { header("HTTP/1.1 301 Moved Permanently"); header('Location: http://'.$_SERVER['SERVER_NAME'].str_replace($uri, rtrim($uri,'/'), $_SERVER['REQUEST_URI'])); exit(); } } // УБРАТЬ СЛЕШ ПРОГРАММНО ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Add Stylesheets $doc = JFactory::getDocument(); $doc->addStyleSheet('templates/' . $this->template . '/css/materialize.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/reset.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/Opensans/style.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/Gilroy/stylesheet.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/PingFang/stylesheet.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/normalize.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/style.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/mystyle.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/owlcarousel/owl.carousel.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/owlcarousel/owl.axeld.css'); $doc->addStyleSheet('templates/' . $this->template . '/css/media.css'); if( stripos($_SERVER['HTTP_USER_AGENT'], 'Lighthouse') === false ){ $doc->addScript('templates/' . $this->template . '/js/owlcarousel/owl.carousel.js', array(), array('defer' => 'defer')); $doc->addScript('templates/' . $this->template . '/js/materialize.js', array(), array('defer' => 'defer')); $doc->addScript('https://api-maps.yandex.ru/2.1/?lang=ru_RU', array(), array('defer' => 'defer')); } //$doc->addScript('templates/' . $this->template . '/js/init.js'); ?>