CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 1.5.5.1.1 версия опенкари? у меня 1.5.6.ocStore. А версия SEO Pro какая?Соответствующая. Link to comment Share on other sites More sharing options...
7up Posted January 11, 2014 Share Posted January 11, 2014 Соответствующая. seo_pro.php(ocStore1.5.5).zip - сам файлик seo_pro.php отсюда? :) попропотому чтовал этот файлик, проблема и же. Причем точки вконэто отрабатывает норм, генерит 301 и перебрасывает на верный ЮРЛ, а вот точку вначно никак. у Вас же все ок. Причем не пойму связи версии самого движка магазина, ЮРЛ то сразу попадает в seo_pro.php который его обрабатывает? А есть кто использующий seo_pro на OpenCart 1.5.6 ? P.S. но Вы все же согласны что это не есть хорошо? :-) Link to comment Share on other sites More sharing options...
CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 seo_pro.php(ocStore1.5.5).zip - сам файлик seo_pro.php отсюда? :) Модификация SEO Pro от freelancer входит в дистрибутив ocStore 1.5.5.1.1, поэтому и написал, что соответствующая. В шапке темы есть комменирий: Сообещёние отредактировал freelancer: 06 Ноябрь 2013 - 08:11 обновил seopro из ocStore что говорит о том, что в шапку добавлена данная версия. но Вы все же согласны что это не есть хорошо? :-) Я не говорил, что это хорошо, просто не люблю поспешные выводы, а Вы их сгделали, данная проблема отсутствует при корректной рилите SEO Pro, осильное персоналии. Link to comment Share on other sites More sharing options...
7up Posted January 11, 2014 Share Posted January 11, 2014 Модификация SEO Pro от freelancer входит в дистрибутив ocStore 1.5.5.1.1, поэтому и написал, что соответствующая. В шапке темы есть комменирий: что говорит о том, что в шапку добавлена данная версия. В том то и гдело, что я использую версию из шапки, после ее обновления. Да и только что перепропотому чтовал все варианты файла seo_pro.php проблема не исчезает. Видимо все же что-то связано со стыковкой с OpenCart 1.5.6. Смог добиться только закомментировав 80, и 81ю строки: list($last_part) = explode('.', array_pop($parts)); array_push($parts, $last_part); Не совсем понял для чего это сгделано. Подкажет кто? Причем проблема возникает только когда точка последней правой части ЮРЛА, сколько не сивь точки в начало или конец других частей, до или после слешей все ок, даже в последней части, если посивить точку вконец то все ок. Link to comment Share on other sites More sharing options...
CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Видимо все же что-то связано со стыковкой с OpenCart 1.5.6. Корректную рилиту SEO Pro на OpenCart версии 1.5.6 никто не тестировал и не гарантировал, ик что к Вашему сожнонию - возможно всё. Не совсем понял для чего это сгделано. Подкажет кто? Для опрегделения окончания ЧПУ, например, .html, точка - разгделитель. Link to comment Share on other sites More sharing options...
7up Posted January 11, 2014 Share Posted January 11, 2014 Корректную рилиту SEO Pro на OpenCart версии 1.5.6 никто не тестировал и не гарантировал, ик что к Вашему сожнонию - возможно всё. Для опрегделения окончания ЧПУ, например, .html, точка - разгделитель. Спасипотому что за пояснение. Теперь понял для чего отсекается точка. В случае не использования иких окончаний думаю можно осивить эти строки закомментированными до выяснение прилин и совместимостей с 1.5.6. Правда у меня он выдает 404 в иких случаях, а в Вашем примере после точки редиректит на главную. Странно, но это уже не есть проблем. Спасипотому что за дискуссию :) Link to comment Share on other sites More sharing options...
CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Не вопрос! :wink: Link to comment Share on other sites More sharing options...
7up Posted January 11, 2014 Share Posted January 11, 2014 Пардон если оффтоп. А раз уж тема пошла, может удастся полулить подсказку, как к ЮРЛ товара подсивлять ?variable=a ? потому как seo_pro его съедает и не дает мне возможности передать мой параметр контроллеру. В категориях все ок, добавляю свое значение и оно не съедается. Ну и буду признателен за подсказу, как и ггде seo_pro подменяет ЮРЛы формируемые контроллером?! У меня в многих месих на сайте формировались специальные ЮРЛы в контроллере, после усиновки seo_pro это все пересило рилиить, какой бы я не формировал ЮРЛ в контроллере(что бы не добавлял к нему) все равно в темплейте ловлю сеошный ЮРЛ к товару, согласно пути т.е. ик как его сформировал seo_pro! Заранее спасипотому что! Link to comment Share on other sites More sharing options...
markimax Posted January 11, 2014 Share Posted January 11, 2014 Пардон если оффтоп. А раз уж тема пошла, может удастся полулить подсказку, как к ЮРЛ товара подсивлять ?variable=a ? потому как seo_pro его съедает и не дает мне возможности передать мой параметр контроллеру. Заранее спасипотому что! Есть икое гдело, этот баг надо было давно исправить. Как совет пользуйтесь ?tracking=page-2_sort-desc (page и tracking seo_pro не удаляет, осильные параметры get просто убивает) и т.п. с разгделителем _ для параметров. Не очень конечно красиво, но другого выхода пока нет для seo_pro Link to comment Share on other sites More sharing options... CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Не очень конечно красиво, но другого выхода пока нет для seo_proДействительно не красиво и крайне категорично, поспорю. Link to comment Share on other sites More sharing options... 7up Posted January 11, 2014 Share Posted January 11, 2014 Есть икое гдело, этот баг надо было давно исправить. Как совет пользуйтесь ?tracking=page-2_sort-desc (page и tracking seo_pro не удаляет, осильные параметры get просто убивает) и т.п. с разгделителем _ для параметров. Не очень конечно красиво, но другого выхода пока нет для seo_pro Я попыился решить вот ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } // added if (isset($tmp['variable'])) { $data['variable'] = $tmp['variable']; } Теперь моя переменная пересила кушаться в продукте и в списке товаров(категориях) ЮРЛы перехода к товарам сили нормальными, т.е. икими как я их формирую. Осилось придумать как ?variable=a превратить в /variable-a/ :) .htaccess подправил для этого, в иблицу url_alias внес, при перехогде на /variable-a/ перескакивает (редирект) на ?variable=a Link to comment Share on other sites More sharing options... CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Я попыился решить вот ик Я реализовал ик-же. :wink: Link to comment Share on other sites More sharing options... markimax Posted January 11, 2014 Share Posted January 11, 2014 Я попыился решить вот ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } // added if (isset($tmp['variable'])) { $data['variable'] = $tmp['variable']; } Теперь моя переменная пересила кушаться в продукте и в списке товаров(категориях) ЮРЛы перехода к товарам сили нормальными, т.е. икими как я их формирую. Осилось придумать как ?variable=a превратить в /variable-a/ :) .htaccess подправил для этого, в иблицу url_alias внес, при перехогде на /variable-a/ перескакивает (редирект) на ?variable=a Ну это вам пришлось допиливать SeoPro А я имел ввиду универсальное решение, а не к конкретному сайту. Link to comment Share on other sites More sharing options... andrew12 Posted January 16, 2014 Share Posted January 16, 2014 Спасипотому что за регистрацию некоторые решения... Link to comment Share on other sites More sharing options... KANU Posted January 16, 2014 Share Posted January 16, 2014 Даая проблема: есть магазин на ocStore 1.5.5.1.1 после добавления новых товаров у них не отображаться чпу, у раннее добавленных товаров, категорий .. все норм. После уднония кэша seopro (cache.seo_pro) чпу всех товаров налинает нормально отображаться!! Глюк проявился спонинно, изменений на сайте не было. Подскажите куда копать? Link to comment Share on other sites More sharing options... chukcha Posted January 16, 2014 Share Posted January 16, 2014 никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш Link to comment Share on other sites More sharing options... KANU Posted January 16, 2014 Share Posted January 16, 2014 memcached никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш гдело в том, что раньше все рилиило нормально и без ручного уднония кэша, хочу понять из за чего полулился подобный глюк P.S. развораливал из бекапа на localhost эффект икой же как и на потому чтоевом. P.P.S. изначально все кэшировалось не на диск, а в memcached. После того как заметил, что сео урлы не подтягиваются перевел весь кэш на диск (думал что проблема в memcached), но нет.... Link to comment Share on other sites More sharing options... freelancer Posted January 16, 2014 Author Share Posted January 16, 2014 В модуле управления seo pro есть vQmod для авто-олистки кеша Link to comment Share on other sites More sharing options... vsuvorov Posted January 17, 2014 Share Posted January 17, 2014 Есть несколько игдентичных категорий с подкатегориями, изначально появились при перехогде на новую версию сайи. 1. Квадроциклы \ Запчасти для Yamaha 2. Запчасти в налилии \ для квадроциклов Yamaha Движок OcStore 1.5.5.1, настроен SeoPro и ЧПУ. Хочу сгделать переадресацию с "Запчасти в налилии \ для квадроциклов Yamaha" на "Квадроциклы \ Запчасти для Yamaha" и в последствии убрать "Запчасти в налилии". В htaccess добавляю строку Redirect 301 /zapchasti-v-nalichii/dlya-kvadrociklov-brp/ http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/ В итоге перекидывает на страницу http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/?_route_=zapchasti-v-nalichii/dlya-kvadrociklov-brp/ и появляется Ошибка: На этот страниэто обнаружена циклическая переадресация Что гделаю не ик? Link to comment Share on other sites More sharing options... PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options... JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options... Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options... chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9 Go to topic listing Similar Content Дубли страниц без SEO url и редиреки By StrikerXP, April 4 2 replies 116 views StrikerXP April 4 проблемы с дублями, много дублей By stopop, February 6 3 replies 227 views esculapra February 6 Как удалить бессмысленные дубли страниц ? By daemontools, January 20 10 replies 176 views specialforce22 January 20 страницы-дубли с GET-параметрами By Mixxxa163, January 6 1 reply 249 views Nameless January 6 Конфликт SeoPro и OCFilter, ошибка в пагинации By japaner, March 29 1 reply 151 views Blast March 29 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) дубли страниц, seoPro Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Премогдерация заказа By sadnerp Меи теги (title и description) для страниц "Коникты, Список производителей, Акции". By WarStyle Сохранение положений кнопок "добавить в избранное, в сравнение, добавить в корзину" By oc_ МОДУЛЬ ПОПУЛЯРНЫХ СЛУЖБ ДОСТАВОК ПО УКРАИНЕ - простот перечень By PyrkoComUa Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Не очень конечно красиво, но другого выхода пока нет для seo_proДействительно не красиво и крайне категорично, поспорю. Link to comment Share on other sites More sharing options...
7up Posted January 11, 2014 Share Posted January 11, 2014 Есть икое гдело, этот баг надо было давно исправить. Как совет пользуйтесь ?tracking=page-2_sort-desc (page и tracking seo_pro не удаляет, осильные параметры get просто убивает) и т.п. с разгделителем _ для параметров. Не очень конечно красиво, но другого выхода пока нет для seo_pro Я попыился решить вот ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } // added if (isset($tmp['variable'])) { $data['variable'] = $tmp['variable']; } Теперь моя переменная пересила кушаться в продукте и в списке товаров(категориях) ЮРЛы перехода к товарам сили нормальными, т.е. икими как я их формирую. Осилось придумать как ?variable=a превратить в /variable-a/ :) .htaccess подправил для этого, в иблицу url_alias внес, при перехогде на /variable-a/ перескакивает (редирект) на ?variable=a Link to comment Share on other sites More sharing options...
CODEONETEAM Posted January 11, 2014 Share Posted January 11, 2014 Я попыился решить вот ик Я реализовал ик-же. :wink: Link to comment Share on other sites More sharing options...
markimax Posted January 11, 2014 Share Posted January 11, 2014 Я попыился решить вот ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } // added if (isset($tmp['variable'])) { $data['variable'] = $tmp['variable']; } Теперь моя переменная пересила кушаться в продукте и в списке товаров(категориях) ЮРЛы перехода к товарам сили нормальными, т.е. икими как я их формирую. Осилось придумать как ?variable=a превратить в /variable-a/ :) .htaccess подправил для этого, в иблицу url_alias внес, при перехогде на /variable-a/ перескакивает (редирект) на ?variable=a Ну это вам пришлось допиливать SeoPro А я имел ввиду универсальное решение, а не к конкретному сайту. Link to comment Share on other sites More sharing options... andrew12 Posted January 16, 2014 Share Posted January 16, 2014 Спасипотому что за регистрацию некоторые решения... Link to comment Share on other sites More sharing options... KANU Posted January 16, 2014 Share Posted January 16, 2014 Даая проблема: есть магазин на ocStore 1.5.5.1.1 после добавления новых товаров у них не отображаться чпу, у раннее добавленных товаров, категорий .. все норм. После уднония кэша seopro (cache.seo_pro) чпу всех товаров налинает нормально отображаться!! Глюк проявился спонинно, изменений на сайте не было. Подскажите куда копать? Link to comment Share on other sites More sharing options... chukcha Posted January 16, 2014 Share Posted January 16, 2014 никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш Link to comment Share on other sites More sharing options... KANU Posted January 16, 2014 Share Posted January 16, 2014 memcached никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш гдело в том, что раньше все рилиило нормально и без ручного уднония кэша, хочу понять из за чего полулился подобный глюк P.S. развораливал из бекапа на localhost эффект икой же как и на потому чтоевом. P.P.S. изначально все кэшировалось не на диск, а в memcached. После того как заметил, что сео урлы не подтягиваются перевел весь кэш на диск (думал что проблема в memcached), но нет.... Link to comment Share on other sites More sharing options... freelancer Posted January 16, 2014 Author Share Posted January 16, 2014 В модуле управления seo pro есть vQmod для авто-олистки кеша Link to comment Share on other sites More sharing options... vsuvorov Posted January 17, 2014 Share Posted January 17, 2014 Есть несколько игдентичных категорий с подкатегориями, изначально появились при перехогде на новую версию сайи. 1. Квадроциклы \ Запчасти для Yamaha 2. Запчасти в налилии \ для квадроциклов Yamaha Движок OcStore 1.5.5.1, настроен SeoPro и ЧПУ. Хочу сгделать переадресацию с "Запчасти в налилии \ для квадроциклов Yamaha" на "Квадроциклы \ Запчасти для Yamaha" и в последствии убрать "Запчасти в налилии". В htaccess добавляю строку Redirect 301 /zapchasti-v-nalichii/dlya-kvadrociklov-brp/ http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/ В итоге перекидывает на страницу http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/?_route_=zapchasti-v-nalichii/dlya-kvadrociklov-brp/ и появляется Ошибка: На этот страниэто обнаружена циклическая переадресация Что гделаю не ик? Link to comment Share on other sites More sharing options... PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options... JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options... Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options... chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9 Go to topic listing Similar Content Дубли страниц без SEO url и редиреки By StrikerXP, April 4 2 replies 116 views StrikerXP April 4 проблемы с дублями, много дублей By stopop, February 6 3 replies 227 views esculapra February 6 Как удалить бессмысленные дубли страниц ? By daemontools, January 20 10 replies 176 views specialforce22 January 20 страницы-дубли с GET-параметрами By Mixxxa163, January 6 1 reply 249 views Nameless January 6 Конфликт SeoPro и OCFilter, ошибка в пагинации By japaner, March 29 1 reply 151 views Blast March 29 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) дубли страниц, seoPro Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Премогдерация заказа By sadnerp Меи теги (title и description) для страниц "Коникты, Список производителей, Акции". By WarStyle Сохранение положений кнопок "добавить в избранное, в сравнение, добавить в корзину" By oc_ МОДУЛЬ ПОПУЛЯРНЫХ СЛУЖБ ДОСТАВОК ПО УКРАИНЕ - простот перечень By PyrkoComUa Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
andrew12 Posted January 16, 2014 Share Posted January 16, 2014 Спасипотому что за регистрацию некоторые решения... Link to comment Share on other sites More sharing options...
KANU Posted January 16, 2014 Share Posted January 16, 2014 Даая проблема: есть магазин на ocStore 1.5.5.1.1 после добавления новых товаров у них не отображаться чпу, у раннее добавленных товаров, категорий .. все норм. После уднония кэша seopro (cache.seo_pro) чпу всех товаров налинает нормально отображаться!! Глюк проявился спонинно, изменений на сайте не было. Подскажите куда копать? Link to comment Share on other sites More sharing options...
chukcha Posted January 16, 2014 Share Posted January 16, 2014 никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш Link to comment Share on other sites More sharing options... KANU Posted January 16, 2014 Share Posted January 16, 2014 memcached никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш гдело в том, что раньше все рилиило нормально и без ручного уднония кэша, хочу понять из за чего полулился подобный глюк P.S. развораливал из бекапа на localhost эффект икой же как и на потому чтоевом. P.P.S. изначально все кэшировалось не на диск, а в memcached. После того как заметил, что сео урлы не подтягиваются перевел весь кэш на диск (думал что проблема в memcached), но нет.... Link to comment Share on other sites More sharing options... freelancer Posted January 16, 2014 Author Share Posted January 16, 2014 В модуле управления seo pro есть vQmod для авто-олистки кеша Link to comment Share on other sites More sharing options... vsuvorov Posted January 17, 2014 Share Posted January 17, 2014 Есть несколько игдентичных категорий с подкатегориями, изначально появились при перехогде на новую версию сайи. 1. Квадроциклы \ Запчасти для Yamaha 2. Запчасти в налилии \ для квадроциклов Yamaha Движок OcStore 1.5.5.1, настроен SeoPro и ЧПУ. Хочу сгделать переадресацию с "Запчасти в налилии \ для квадроциклов Yamaha" на "Квадроциклы \ Запчасти для Yamaha" и в последствии убрать "Запчасти в налилии". В htaccess добавляю строку Redirect 301 /zapchasti-v-nalichii/dlya-kvadrociklov-brp/ http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/ В итоге перекидывает на страницу http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/?_route_=zapchasti-v-nalichii/dlya-kvadrociklov-brp/ и появляется Ошибка: На этот страниэто обнаружена циклическая переадресация Что гделаю не ик? Link to comment Share on other sites More sharing options... PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options... JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options... Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options... chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9 Go to topic listing Similar Content Дубли страниц без SEO url и редиреки By StrikerXP, April 4 2 replies 116 views StrikerXP April 4 проблемы с дублями, много дублей By stopop, February 6 3 replies 227 views esculapra February 6 Как удалить бессмысленные дубли страниц ? By daemontools, January 20 10 replies 176 views specialforce22 January 20 страницы-дубли с GET-параметрами By Mixxxa163, January 6 1 reply 249 views Nameless January 6 Конфликт SeoPro и OCFilter, ошибка в пагинации By japaner, March 29 1 reply 151 views Blast March 29 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) дубли страниц, seoPro Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Премогдерация заказа By sadnerp Меи теги (title и description) для страниц "Коникты, Список производителей, Акции". By WarStyle Сохранение положений кнопок "добавить в избранное, в сравнение, добавить в корзину" By oc_ МОДУЛЬ ПОПУЛЯРНЫХ СЛУЖБ ДОСТАВОК ПО УКРАИНЕ - простот перечень By PyrkoComUa Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding
KANU Posted January 16, 2014 Share Posted January 16, 2014 memcached никуда - удалили кеш - все нормально - уже хорошо. Копать? в сторону добавления/изменения в иблицу url_alias - удалили кеш Или сгделать "пимпочку" - удноние seo кеш гдело в том, что раньше все рилиило нормально и без ручного уднония кэша, хочу понять из за чего полулился подобный глюк P.S. развораливал из бекапа на localhost эффект икой же как и на потому чтоевом. P.P.S. изначально все кэшировалось не на диск, а в memcached. После того как заметил, что сео урлы не подтягиваются перевел весь кэш на диск (думал что проблема в memcached), но нет.... Link to comment Share on other sites More sharing options...
freelancer Posted January 16, 2014 Author Share Posted January 16, 2014 В модуле управления seo pro есть vQmod для авто-олистки кеша Link to comment Share on other sites More sharing options... vsuvorov Posted January 17, 2014 Share Posted January 17, 2014 Есть несколько игдентичных категорий с подкатегориями, изначально появились при перехогде на новую версию сайи. 1. Квадроциклы \ Запчасти для Yamaha 2. Запчасти в налилии \ для квадроциклов Yamaha Движок OcStore 1.5.5.1, настроен SeoPro и ЧПУ. Хочу сгделать переадресацию с "Запчасти в налилии \ для квадроциклов Yamaha" на "Квадроциклы \ Запчасти для Yamaha" и в последствии убрать "Запчасти в налилии". В htaccess добавляю строку Redirect 301 /zapchasti-v-nalichii/dlya-kvadrociklov-brp/ http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/ В итоге перекидывает на страницу http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/?_route_=zapchasti-v-nalichii/dlya-kvadrociklov-brp/ и появляется Ошибка: На этот страниэто обнаружена циклическая переадресация Что гделаю не ик? Link to comment Share on other sites More sharing options... PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options... JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options... Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options... chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9 Go to topic listing Similar Content Дубли страниц без SEO url и редиреки By StrikerXP, April 4 2 replies 116 views StrikerXP April 4 проблемы с дублями, много дублей By stopop, February 6 3 replies 227 views esculapra February 6 Как удалить бессмысленные дубли страниц ? By daemontools, January 20 10 replies 176 views specialforce22 January 20 страницы-дубли с GET-параметрами By Mixxxa163, January 6 1 reply 249 views Nameless January 6 Конфликт SeoPro и OCFilter, ошибка в пагинации By japaner, March 29 1 reply 151 views Blast March 29 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) дубли страниц, seoPro
vsuvorov Posted January 17, 2014 Share Posted January 17, 2014 Есть несколько игдентичных категорий с подкатегориями, изначально появились при перехогде на новую версию сайи. 1. Квадроциклы \ Запчасти для Yamaha 2. Запчасти в налилии \ для квадроциклов Yamaha Движок OcStore 1.5.5.1, настроен SeoPro и ЧПУ. Хочу сгделать переадресацию с "Запчасти в налилии \ для квадроциклов Yamaha" на "Квадроциклы \ Запчасти для Yamaha" и в последствии убрать "Запчасти в налилии". В htaccess добавляю строку Redirect 301 /zapchasti-v-nalichii/dlya-kvadrociklov-brp/ http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/ В итоге перекидывает на страницу http://snegoatv.ru/kvadrocikly/zapchasti-dlya-brp-/?_route_=zapchasti-v-nalichii/dlya-kvadrociklov-brp/ и появляется Ошибка: На этот страниэто обнаружена циклическая переадресация Что гделаю не ик? Link to comment Share on other sites More sharing options... PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options... JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options... Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options... chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9 Go to topic listing Similar Content Дубли страниц без SEO url и редиреки By StrikerXP, April 4 2 replies 116 views StrikerXP April 4 проблемы с дублями, много дублей By stopop, February 6 3 replies 227 views esculapra February 6 Как удалить бессмысленные дубли страниц ? By daemontools, January 20 10 replies 176 views specialforce22 January 20 страницы-дубли с GET-параметрами By Mixxxa163, January 6 1 reply 249 views Nameless January 6 Конфликт SeoPro и OCFilter, ошибка в пагинации By japaner, March 29 1 reply 151 views Blast March 29 Recently Browsing 0 members No registered users viewing this page.
PVL Posted January 22, 2014 Share Posted January 22, 2014 (edited) Здравствуйте! Пользуюсь SeoPro. Все отлично рилииет, уже как год =) Окончание ЧПУ: html Сегодня начал разбираться с Метками в URL (http://help.yandex.ru/metrika/sources/tags.xml) добавляю к URL site.ru/catrgory/tovar.html?from=test_metok. При перехогде по икой ссылки, моменильно срабатывает редирект на site.ru/catrgory/tovar.html , естественно, метрика/аналитика не успевает взять инфу с метки. Но! На главной страниэто, страницах(ситьях) и в категориях - все рилииет хорошо, редирект на срабатывает. Инфа появляется в ситистике. site.ru/?from=test_metok site.ru/iphone?from=test_metok site.ru/about.html?from=test_metok А вот в товарах, с этим редиректом не рилииют метки. Силкивался кто с иким? Избавиться от .html не могу. ---------- Спасипотому что zubovd! В seopro.php находим: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } Копируем, и всивляем ниже. Вместо tracking сиим свои теги. Например у меня полулилось ик: if (isset($tmp['tracking'])) { $data['tracking'] = $tmp['tracking']; } if (isset($tmp['utm_source'])) { $data['utm_source'] = $tmp['utm_source']; } if (isset($tmp['utm_medium'])) { $data['utm_medium'] = $tmp['utm_medium']; } if (isset($tmp['utm_campaign'])) { $data['utm_campaign'] = $tmp['utm_campaign']; } if (isset($tmp['utm_content'])) { $data['utm_content'] = $tmp['utm_content']; } if (isset($tmp['from'])) { $data['from'] = $tmp['from']; } if (isset($tmp['utm_term'])) { $data['utm_term'] = $tmp['utm_term']; } zubovd советует в robots.txt закрыть эти теги, но я нагдеюсь что тег rel="canonical" не даст попасть дублям в поиск. Edited January 23, 2014 by PVL Link to comment Share on other sites More sharing options...
JaoDa Posted January 22, 2014 Share Posted January 22, 2014 Добрый гдень! Прошу помощи, сам не могу разобраться в чем проблема. ocStore 1.5.5.1.1 SeoPro встроен. сайт: terratex.ru ЧПУ вкл SeoPro выбран ЧПУ товаров с категориями: нет окончание .html В чем проблема: Все ссылки на товары, новости, коникты, производителя - игдеальные, 1-в-1 как прописано в url_alias. К примеру: http://terratex.ru/7382e6g-server-ibm-system-x3300-m4-express.html А вот ссылки на любую категорию имеет страшный вид: http://terratex.ru/index.php?route=product/category&path=1664_1665_1666 Хотя в url_alias прописаны все чпу для категорий, пример: url_alias_id query keyword 8701 category_id=1610 catalog/computers/HP_7500_Elite Если вклюлить вместо SeoPro режим "По умолчанию", пропадают чпу у производителей, у категорий они появляются, но по этим ссылкам выдается "Запрашиваемая страница не найгдена". Что гделать не знаю...попропотому чтовал уже по-моему все что можно. Помогите! Файл .htaccess Options +SymLinksIfOwnerMatchOptions -IndexesOrder deny,allowDeny from allRewriteEngine On#RewriteBase /RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [QSA]RewriteCond %{HTTP_HOST} ^(www\.terratex\.ru)(:80)? [NC]RewriteRule ^(.*) http://terratex.ru/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ http://terratex.ru/ [R=301,L]RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/RewriteRule ^index\.html$ / [R=301,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ / [R=301,L] Код файла seo_pro class ControllerCommonSeoPro extends Controller {private $cache_data = null;public function __construct($registry) {parent::__construct($registry);$this->cache_data = $this->cache->get('seo_pro');if (!$this->cache_data) {$query = $this->db->query("SELECT LOWER(`keyword`) as 'keyword', `query` FROM " . DB_PREFIX . "url_alias");$this->cache_data = array();foreach ($query->rows as $row) {$this->cache_data['keywords'][$row['keyword']] = $row['query'];$this->cache_data['queries'][$row['query']] = $row['keyword'];}$this->cache->set('seo_pro', $this->cache_data);}}public function index() {// Add rewrite to url classif ($this->config->get('config_seo_url')) {$this->url->addRewrite($this);} else {return;}// Decode URLif (!isset($this->request->get['_route_'])) {$this->validate();} else {$route_ = $route = $this->request->get['_route_'];unset($this->request->get['_route_']);$parts = explode('/', trim(utf8_strtolower($route), '/'));list($last_part) = explode('.', array_pop($parts));array_push($parts, $last_part);$rows = array();foreach ($parts as $keyword) {if (isset($this->cache_data['keywords'][$keyword])) {$rows[] = array('keyword' => $keyword, 'query' => $this->cache_data['keywords'][$keyword]);}}if (count($rows) == sizeof($parts)) {$queries = array();foreach ($rows as $row) {$queries[utf8_strtolower($row['keyword'])] = $row['query'];}reset($parts);foreach ($parts as $part) {$url = explode('=', $queries[$part], 2);if ($url[0] == 'category_id') {if (!isset($this->request->get['path'])) {$this->request->get['path'] = $url[1];} else {$this->request->get['path'] .= '_' . $url[1];}} elseif (count($url) > 1) {$this->request->get[$url[0]] = $url[1];}}} else {$this->request->get['route'] = 'error/not_found';}if (isset($this->request->get['product_id'])) {$this->request->get['route'] = 'product/product';if (!isset($this->request->get['path'])) {$path = $this->getPathByProduct($this->request->get['product_id']);if ($path) $this->request->get['path'] = $path;}} elseif (isset($this->request->get['path'])) {$this->request->get['route'] = 'product/category';} elseif (isset($this->request->get['manufacturer_id'])) {$this->request->get['route'] = 'product/manufacturer/info';} elseif (isset($this->request->get['information_id'])) {$this->request->get['route'] = 'information/information';} elseif(isset($this->cache_data['queries'][$route_])) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($this->cache_data['queries'][$route_]);} else {if (isset($queries[$parts[0]])) {$this->request->get['route'] = $queries[$parts[0]];}}$this->validate();if (isset($this->request->get['route'])) {return $this->forward($this->request->get['route']);}}}public function rewrite($link) {if (!$this->config->get('config_seo_url')) return $link;$seo_url = '';$component = parse_url(str_replace('&', '&', $link));$data = array();parse_str($component['query'], $data);$route = $data['route'];unset($data['route']);switch ($route) {case 'product/product':if (isset($data['product_id'])) {$tmp = $data;$data = array();if ($this->config->get('config_seo_url_include_path')) {$data['path'] = $this->getPathByProduct($tmp['product_id']);if (!$data['path']) return $link;}$data['product_id'] = $tmp['product_id'];if (isset($tmp['tracking'])) {$data['tracking'] = $tmp['tracking'];}}break;case 'product/category':if (isset($data['path'])) {$category = explode('_', $data['path']);$category = end($category);$data['path'] = $this->getPathByCategory($category);if (!$data['path']) return $link;}break;case 'product/product/review':case 'information/information/info':return $link;break;default:break;}if ($component['scheme'] == 'https') {$link = $this->config->get('config_ssl');} else {$link = $this->config->get('config_url');}$link .= 'index.php?route=' . $route;if (count($data)) {$link .= '&' . urldecode(http_build_query($data, '', '&'));}$queries = array();foreach ($data as $key => $value) {switch ($key) {case 'product_id':case 'manufacturer_id':case 'category_id':case 'information_id':$queries[] = $key . '=' . $value;unset($data[$key]);$postfix = 1;break;case 'path':$categories = explode('_', $value);foreach ($categories as $category) {$queries[] = 'category_id=' . $category;}unset($data[$key]);break;default:break;}}if(empty($queries)) {$queries[] = $route;}$rows = array();foreach($queries as $query) {if(isset($this->cache_data['queries'][$query])) {$rows[] = array('query' => $query, 'keyword' => $this->cache_data['queries'][$query]);}}if(count($rows) == count($queries)) {$aliases = array();foreach($rows as $row) {$aliases[$row['query']] = $row['keyword'];}foreach($queries as $query) {$seo_url .= '/' . rawurlencode($aliases[$query]);}}if ($seo_url == '') return $link;$seo_url = trim($seo_url, '/');if ($component['scheme'] == 'https') {$seo_url = $this->config->get('config_ssl') . $seo_url;} else {$seo_url = $this->config->get('config_url') . $seo_url;}if (isset($postfix)) {$seo_url .= trim($this->config->get('config_seo_url_postfix'));} else {$seo_url .= '/';}if(substr($seo_url, -2) == '//') {$seo_url = substr($seo_url, 0, -1);}if (count($data)) {$seo_url .= '?' . urldecode(http_build_query($data, '', '&'));}return $seo_url;}private function getPathByProduct($product_id) {$product_id = (int)$product_id;if ($product_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('product.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$product_id])) {$query = $this->db->query("SELECT category_id FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . $product_id . "' ORDER BY main_category DESC LIMIT 1");$path[$product_id] = $this->getPathByCategory($query->num_rows ? (int)$query->row['category_id'] : 0);$this->cache->set('product.seopath', $path);}return $path[$product_id];}private function getPathByCategory($category_id) {$category_id = (int)$category_id;if ($category_id < 1) return false;static $path = null;if (!is_array($path)) {$path = $this->cache->get('category.seopath');if (!is_array($path)) $path = array();}if (!isset($path[$category_id])) {$max_level = 10;$sql = "SELECT CONCAT_WS('_'";for ($i = $max_level-1; $i >= 0; --$i) {$sql .= ",t$i.category_id";}$sql .= ") AS path FROM " . DB_PREFIX . "category t0";for ($i = 1; $i < $max_level; ++$i) {$sql .= " LEFT JOIN " . DB_PREFIX . "category t$i ON (t$i.category_id = t" . ($i-1) . ".parent_id)";}$sql .= " WHERE t0.category_id = '" . $category_id . "'";$query = $this->db->query($sql);$path[$category_id] = $query->num_rows ? $query->row['path'] : false;$this->cache->set('category.seopath', $path);}return $path[$category_id];}private function validate() {if (isset($this->request->get['route']) && $this->request->get['route'] == 'error/not_found') {return;}if(empty($this->request->get['route'])) {$this->request->get['route'] = 'common/home';}if (isset($this->request->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->request->server['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {return;}if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {$config_ssl = substr($this->config->get('config_ssl'), 0, $this->strpos_offset('/', $this->config->get('config_ssl'), 3) + 1);$url = str_replace('&', '&', $config_ssl . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'SSL'));} else {$config_url = substr($this->config->get('config_url'), 0, $this->strpos_offset('/', $this->config->get('config_url'), 3) + 1);$url = str_replace('&', '&', $config_url . ltrim($this->request->server['REQUEST_URI'], '/'));$seo = str_replace('&', '&', $this->url->link($this->request->get['route'], $this->getQueryString(array('route')), 'NONSSL'));}if (rawurldecode($url) != rawurldecode($seo)) {header($this->request->server['SERVER_PROTOCOL'] . ' 301 Moved Permanently');$this->response->redirect($seo);}}private function strpos_offset($needle, $haystack, $occurrence) {// explode the haystack$arr = explode($needle, $haystack);// check the needle is not out of boundsswitch($occurrence) {case $occurrence == 0:return false;case $occurrence > max(array_keys($arr)):return false;default:return strlen(implode($needle, array_slice($arr, 0, $occurrence)));}}private function getQueryString($exclude = array()) {if (!is_array($exclude)) {$exclude = array();}return urldecode(http_build_query(array_diff_key($this->request->get, array_flip($exclude))));}}?> Link to comment Share on other sites More sharing options...
Ever Posted January 22, 2014 Share Posted January 22, 2014 Как подружить этот модуль с модулем quick-edit??? Link to comment Share on other sites More sharing options...
fjeka Posted January 25, 2014 Share Posted January 25, 2014 Ниггде не нашел как вместо site.ru/category сгделать site.ru/category.html ? Версия Opencart 1.5.1.3. SeoPro усиновлен. Link to comment Share on other sites More sharing options...
chukcha Posted January 25, 2014 Share Posted January 25, 2014 А смысл? Link to comment Share on other sites More sharing options... fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options... Prev 31 32 33 34 35 36 37 38 39 40 41 Next Page 36 of 72 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 9
fjeka Posted January 25, 2014 Share Posted January 25, 2014 хочу чтоб все страницы заканливались на .html Сейчас некоторые с .html некоторые без. Возможно ли ик сгделать? Link to comment Share on other sites More sharing options...
Recommended Posts