Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 11 Ответов
  • 1314 Просмотров
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Добрый день нужна ваша помощь.
После обновления на Joomla 3 нашел у себя проблему решить сам не могу, нужна ваша помощь.
Вот суть:
При выключенном ЧПУ все работает. Проверял переходом по ссылки из категории.
Ссылка с ЧПУ: https://webrap*info/diskografiya/2517/sobaka
Без ЧПУ: https://webrap*info/index.php?option=com_content&view=article&id=26:sobaka&catid=172&Itemid=3
Доп: При смене алиаса материала через админку все работает. Как навести порядок, чтоб материалы отображались по своим ссылкам с ЧПУ.
 
*

voland

  • Легенда
  • 11031
  • 588 / 112
  • Эта строка съедает место на вашем мониторе
*

ProtectYourSite

  • Живу я здесь
  • 2356
  • 135 / 4
  • Безопасность вебсайтов
Как навести порядок, чтоб материалы отображались по своим ссылкам с ЧПУ.
 

Используйте пункты меню или ждите новый роутер - зависит какого эффекта хотите добиться
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Используйте пункты меню или ждите новый роутер - зависит какого эффекта хотите добиться
Хочу чтобы все материалы открывались с ЧПУ. В итоге открывается 90% страниц. А 10% страниц с сайта выдает ошибку 404. Хочу это исправить, не могу понять как.
Вот пример:
На сайте есть раздел дискография/2517 в нем есть альбомы группы 25/17.
Некоторые альбомы X при открытие выдают 404 ошибку, а альбомы Y открываются хорошо.
*

voland

  • Легенда
  • 11031
  • 588 / 112
  • Эта строка съедает место на вашем мониторе
Хочу чтобы все материалы открывались с ЧПУ. В итоге открывается 90% страниц. А 10% страниц с сайта выдает ошибку 404. Хочу это исправить, не могу понять как.
Вот пример:
На сайте есть раздел дискография/2517 в нем есть альбомы группы 25/17.
Некоторые альбомы X при открытие выдают 404 ошибку, а альбомы Y открываются хорошо.

Ссылки!
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Ссылки!
Раздел на сайте: https://webrap.info/diskografiya/2517
Контент:
Название материала 25/17 - "Зебра" (Альбом/2010) ссылка https: //webrap.info/diskografiya/2517/zebra ошибка 404
Название материала Иезикииль 25/17 - "Крепче Стали" (Альбом/2008) ссылка https://webrap.info/diskografiya/2517/krepche-stali все ОК.
« Последнее редактирование: 26.04.2018, 15:39:31 от webrapinfo »
*

ProtectYourSite

  • Живу я здесь
  • 2356
  • 135 / 4
  • Безопасность вебсайтов
Зебра относится к категории 2517?
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Зебра относится к категории 2517?
Да.
*

ProtectYourSite

  • Живу я здесь
  • 2356
  • 135 / 4
  • Безопасность вебсайтов
Хаки роутера применялись?  Должно открываться ид-алиас, у вас в ссылках такого не видно?
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Хаки роутера применялись?  Должно открываться ид-алиас, у вас в ссылках такого не видно?
Еще давно когда был на Joomla 1.5 помню что убирал ID c URL. Не подскажите где искать фаил?
« Последнее редактирование: 26.06.2017, 12:32:12 от webrapinfo »
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Проблема описана выше.
Версия Joomla 3.7
Версия PHP 7.1
Все еще не победил проблему я не программист. Прошу помощи тех кто понимает в коде.
.htaccess
Код
##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it inva
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +SymLinksIfOwnerMatch

#
#  Mod_rewrite in use

RewriteEngine On
# Ниже представлена строка для переадресации страницы вида сайт/index.php/материал на страницу сайт/материал
RewriteRule ^index.php/(.+)$ https://webrap.info/$1 [R=301,L]

RewriteRule ^m/(.+)$ https://webrap.info/$1 [R=301,L]

RewriteRule ^mobile/(.+)$ https://webrap.info/$1 [R=301,L]

RewriteBase /
RewriteCond %{HTTP:SSL} !=1 [NC]
RewriteRule ^(.*) https://webrap.info/$1 [L,R=301]

# Переадресация сайт/index.php на сайт
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP
#RewriteRule ^index\.php$ http://webrap.info/ [R=301,L]

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension XML files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension XML files
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits


########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects

RewriteCond %{REQUEST_URI} ^/sitemap.xml
RewriteRule .* /index.php?option=com_osmap&view=xml&format=html&id=1 [L]

RewriteCond %{REQUEST_URI} ^/sitemap
RewriteRule .* /index.php?option=com_osmap&view=html&format=html&id=1 [L]

RewriteCond %{REQUEST_URI} ^/sitemap.html
RewriteRule .* /index.php?option=com_osmap&view=html&format=html&id=1 [L]



#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)
# Комментрарий Редирект ?device=desktop в конце на страницу без device=desktop
RewriteCond %{QUERY_STRING} ^device=desktop
RewriteRule ^(.*)$  http://%{HTTP_HOST}/$0? [R=301,L]
 #2 переадресация https://webrap.info/?change_mobile=1 на http://webrap.info
#RewriteCond %{QUERY_STRING} ^change_mobile=1
#RewriteRule ^(.*)$  https://%{HTTP_HOST}/$0? [R=301,L]



# RewriteBase /
#Redirect 301 /text-pesen/triada/bracho62 /text-pesen/triada/bracho-triada
#Redirect 301 /text-pesen/garri-topor/garri-topor-toni-raut-kvantoviy-skachek-klip http://webrap.info/klipi/garri-topor/garri-topor-toni-raut-kvantoviy-skachek-klip
#Redirect 301 /diskografiya/triada/trilogy-soldiers-pogruzhenie-v-zhizn-albom-2013 http://webrap.info/diskografiya/trilogy-soldiers/trilogy-soldiers-pogruzhenie-v-zhizn-albom-2013
#Redirect 301 /text-pesen/2517/text-pesni-na-ribalku-nigativ-zmey http://webrap.info/text-pesen/triada/text-pesni-na-ribalku-nigativ-zmey
#Redirect 301 /versus/versus-main-event-2/twxt-duni-vs-oxxxymiron-versus-battle-main-event-2 /versus/text-uchastnikov-versusa/twxt-duni-vs-oxxxymiron-versus-battle-main-event-2
#Redirect 301 /versus/versus-battle-sezon-1/versus-battle-sezon-3-dunya-vs-koresh /versus/versus-battle-sezon-3/versus-battle-sezon-3-dunya-vs-koresh
#Redirect 301 /text-pesen/triada/bracho /text-pesen/smoky-mo/bracho
#Redirect 301 /obmen-ssilkami /informaciya/obmen-ssilkami
#Redirect 301 /text-pesen/garri-toror/garri-topor-toni-raut-kvantoviy-skachek-klip /klipi/garri-topor/garri-topor-toni-raut-kvantoviy-skachek-klip
#Redirect 301 /versus/versus-main-event/brol-vs-pasha-tehnik-versus-main-event-sezon-2-vipusk-6 /versus/versus-main-event-2/brol-vs-pasha-tehnik-versus-main-event-sezon-2-vipusk-6

#Redirect 301 /diskografiya/2517/basta-smoki-mo-albom-2015 /diskografiya/basta-naggano-n1nt3ndo/basta-smoki-mo-albom-2015
#Redirect 301 https://webrap.info/?change_mobile=1 https://webrap.info
########## Begin - Joomla! core SEF Section
#

Redirect 301 /news/news-video/versus-battle-1-garri-topor-billy-milligan /versus/versus-battle-sezon-1/versus-battle-vipusk-1-garri-topor-billy-milligan

Redirect 301 /versus/grot-unesla-reka-tekst-pesni /text-pesen/grot/grot-unesla-reka-tekst-pesni
Redirect 301 /versus/kasta-chetyrekhglavyj-oret-albom-2017 /diskografiya/kasta/kasta-chetyrekhglavyj-oret-albom-2017


#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
RewriteCond %{REQUEST_URI} ^/sitemap.xml
RewriteRule .* /index.php?option=com_xmap&id=1&view=xml

#Защита от скриптов CSP http://*.vk.com https://*.vk.com https://vk.com http://vk.com
#<IfModule mod_headers.c>
#Header set Content-Security-Policy "default-src 'self';style-src 'unsafe-inline' *;frame-src *;img-src * data:;media-src *;font-src *; object-src 'self' http://www.youtube-nocookie.com https://mc.yandex.ru http://www.youtube.com http://www.youtube-nocookie.com https://pagead2.googlesyndication.com ; connect-src 'self' http://*.google-analytics.com https://*.google-analytics.com https://google-analytics.com http://google-analytics.com https://ajax.googleapis.com http://*.pagead2.googlesyndication.com https://*.pagead2.googlesyndication.com https://pagead2.googlesyndication.com http://pagead2.googlesyndication.com  http://*.mc.yandex.ru https://*.mc.yandex.ru https://mc.yandex.ru http://mc.yandex.ru https://www.youtube.com http://www.youtube.com http://www.youtube-nocookie.com https://graph.facebook.com http://graph.facebook.com https://urls.api.twitter.com http://urls.api.twitter.com https://www.odnoklassniki.ru http://www.odnoklassniki.ru https://vk.com http://vk.com ;script-src 'self' 'unsafe-inline' 'unsafe-eval' http://www.youtube-nocookie.com https://www.youtube.com http://www.youtube.com https://ajax.googleapis.com http://*.pagead2.googlesyndication.com https://*.pagead2.googlesyndication.com https://pagead2.googlesyndication.com http://pagead2.googlesyndication.com https://apis.google.com  https://ajax.googleapis.com https://vkontakte.ru  https://www.odnoklassniki.ru http://*.facebook.com https://*.facebook.com https://facebook.com http://facebook.com https://graph.facebook.com http://graph.facebook.com http://*.google-analytics.com https://*.google-analytics.com https://google-analytics.com http://google-analytics.com https://connect.ok.ru http://*.vk.com https://*.vk.com https://vk.com http://vk.com https://login.vk.com  http://mc.yandex.ru https://mc.yandex.ru http://*.api.twitter.com https://*.api.twitter.com https://urls.api.twitter.com http://urls.api.twitter.com http://*.odnoklassniki.ru https://*.odnoklassniki.ru https://odnoklassniki.ru http://odnoklassniki.ru https://scounter.rambler.ru ; report-uri /csp.php"
#</IfModule>




# Включение gzip сжатия русским трактористом text, HTML, javascript, CSS, xml:
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
SetOutputFilter DEFLATE

########## End - Joomla! core SEF Section
и вот фаил /components/com_content/router.php
Цитировать
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Routing class of com_content
 *
 * @since  3.3
 */
class ContentRouter extends JComponentRouterView
{
   protected $noIDs = false;

   /**
    * Content Component router constructor
    *
    * @param   JApplicationCms  $app   The application object
    * @param   JMenu            $menu  The menu object to work with
    */
   public function __construct($app = null, $menu = null)
   {
      $params = JComponentHelper::getParams('com_content');
      $this->noIDs = (bool) $params->get('sef_ids');
      $categories = new JComponentRouterViewconfiguration('categories');
      $categories->setKey('id');
      $this->registerView($categories);
      $category = new JComponentRouterViewconfiguration('category');
      $category->setKey('id')->setParent($categories, 'catid')->setNestable()->addLayout('blog');
      $this->registerView($category);
      $article = new JComponentRouterViewconfiguration('article');
      $article->setKey('id')->setParent($category, 'catid');
      $this->registerView($article);
      $this->registerView(new JComponentRouterViewconfiguration('archive'));
      $this->registerView(new JComponentRouterViewconfiguration('featured'));
      $this->registerView(new JComponentRouterViewconfiguration('form'));

      parent::__construct($app, $menu);

      $this->attachRule(new JComponentRouterRulesMenu($this));

      if ($params->get('sef_advanced', 0))
      {
         $this->attachRule(new JComponentRouterRulesStandard($this));
         $this->attachRule(new JComponentRouterRulesNomenu($this));
      }
      else
      {
         JLoader::register('ContentRouterRulesLegacy', __DIR__ . '/helpers/legacyrouter.php');
         $this->attachRule(new ContentRouterRulesLegacy($this));
      }
   }

   /**
    * Method to get the segment(s) for a category
    *
    * @param   string  $id     ID of the category to retrieve the segments for
    * @param   array   $query  The request that is built right now
    *
    * @return  array|string  The segments of this item
    */
   public function getCategorySegment($id, $query)
   {
      $category = JCategories::getInstance($this->getName())->get($id);

      if ($category)
      {
         $path = array_reverse($category->getPath(), true);
         $path[0] = '1:root';

         if ($this->noIDs)
         {
            foreach ($path as &$segment)
            {
               list($id, $segment) = explode(':', $segment, 2);
            }
         }

         return $path;
      }

      return array();
   }

   /**
    * Method to get the segment(s) for a category
    *
    * @param   string  $id     ID of the category to retrieve the segments for
    * @param   array   $query  The request that is built right now
    *
    * @return  array|string  The segments of this item
    */
   public function getCategoriesSegment($id, $query)
   {
      return $this->getCategorySegment($id, $query);
   }

   /**
    * Method to get the segment(s) for an article
    *
    * @param   string  $id     ID of the article to retrieve the segments for
    * @param   array   $query  The request that is built right now
    *
    * @return  array|string  The segments of this item
    */
   public function getArticleSegment($id, $query)
   {
      if (!strpos($id, ':'))
      {
         $db = JFactory::getDbo();
         $dbquery = $db->getQuery(true);
         $dbquery->select($dbquery->qn('alias'))
            ->from($dbquery->qn('#__content'))
            ->where('id = ' . $dbquery->q($id));
         $db->setQuery($dbquery);

         $id .= ':' . $db->loadResult();
      }

      if ($this->noIDs)
      {
         list($void, $segment) = explode(':', $id, 2);

         return array($void => $segment);
      }

      return array((int) $id => $id);
   }

   /**
    * Method to get the id for a category
    *
    * @param   string  $segment  Segment to retrieve the ID for
    * @param   array   $query    The request that is parsed right now
    *
    * @return  mixed   The id of this item or false
    */
   public function getCategoryId($segment, $query)
   {
      if (isset($query['id']))
      {
         $category = JCategories::getInstance($this->getName())->get($query['id']);

         foreach ($category->getChildren() as $child)
         {
            if ($this->noIDs)
            {
               if ($child->alias == $segment)
               {
                  return $child->id;
               }
            }
            else
            {
               if ($child->id == (int) $segment)
               {
                  return $child->id;
               }
            }
         }
      }

      return false;
   }

   /**
    * Method to get the segment(s) for a category
    *
    * @param   string  $segment  Segment to retrieve the ID for
    * @param   array   $query    The request that is parsed right now
    *
    * @return  mixed   The id of this item or false
    */
   public function getCategoriesId($segment, $query)
   {
      return $this->getCategoryId($segment, $query);
   }

   /**
    * Method to get the segment(s) for an article
    *
    * @param   string  $segment  Segment of the article to retrieve the ID for
    * @param   array   $query    The request that is parsed right now
    *
    * @return  mixed   The id of this item or false
    */
   public function getArticleId($segment, $query)
   {
      if ($this->noIDs)
      {
         $db = JFactory::getDbo();
         $dbquery = $db->getQuery(true);
         $dbquery->select($dbquery->qn('id'))
            ->from($dbquery->qn('#__content'))
            ->where('alias = ' . $dbquery->q($segment))
            ->where('catid = ' . $dbquery->q($query['id']));
         $db->setQuery($dbquery);

         return (int) $db->loadResult();
      }

      return (int) $segment;
   }
}

/**
 * Content router functions
 *
 * These functions are proxys for the new router interface
 * for old SEF extensions.
 *
 * @param   array  &$query  An array of URL arguments
 *
 * @return  array  The URL arguments to use to assemble the subsequent URL.
 *
 * @deprecated  4.0  Use Class based routers instead
 */
function contentBuildRoute(&$query)
{
   $app = JFactory::getApplication();
   $router = new ContentRouter($app, $app->getMenu());

   return $router->build($query);
}

/**
 * Parse the segments of a URL.
 *
 * This function is a proxy for the new router interface
 * for old SEF extensions.
 *
 * @param   array  $segments  The segments of the URL to parse.
 *
 * @return  array  The URL attributes to be used by the application.
 *
 * @since   3.3
 * @deprecated  4.0  Use Class based routers instead
 */
function contentParseRoute($segments)
{
   $app = JFactory::getApplication();
   $router = new ContentRouter($app, $app->getMenu());

   return $router->parse($segments);
}
Прошу помочь отблагодарю того кто найдет решение.
« Последнее редактирование: 11.07.2017, 15:02:36 от webrapinfo »
*

webrapinfo

  • Осваиваюсь на форуме
  • 19
  • 0 / 0
Тему можно закрыть. Решение проблемы так и не нашел. Поступил следующим образом. Поменял алиас в админке на тех материалах которые выдавал 404 ошибку.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Что хранится в таблице overrider Joomla 3?

Автор web1

Ответов: 1
Просмотров: 81
Последний ответ 27.03.2024, 19:14:58
от web1
reCAPTCHA V2 Google - Для Joomla 3

Автор Alex GOOD

Ответов: 35
Просмотров: 8258
Последний ответ 10.01.2024, 21:41:38
от Vastriet
Joomla 3.10.12 и MySQL 8

Автор designer71

Ответов: 0
Просмотров: 371
Последний ответ 19.10.2023, 11:25:18
от designer71
Почему Joomla не поддерживает формат webp?

Автор Sensession

Ответов: 74
Просмотров: 10505
Последний ответ 03.10.2023, 19:44:42
от fsv
erid в Joomla

Автор newalex

Ответов: 0
Просмотров: 305
Последний ответ 25.09.2023, 18:45:34
от newalex