siv1987 Posted December 27, 2013 Share Posted December 27, 2013 Заметил давно что ПС индексируют страницы типа:правильная, каноническая страница: /tags/forums/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82/дубли этой страницы: /tags/forums/%25D0%25BF%25D1%2580%25D0%25B8%25D0%25B2%25D0%25B5%25D1%2582/ /tags/forums/%2525D0%2525BF%2525D1%252580%2525D0%2525B8%2525D0%2525B2%2525D0%2525B5%2525D1%252582/ /tags/forums/%252525D0%252525BF%252525D1%25252580%252525D0%252525B8%252525D0%252525B2%252525D0%252525/ и так далее каждый раз закодированный урл предыдущего адреса.Сейчас, занимаясь оптимизацией одного форума, снова наткнулся в логах на подобные запросы. В исходный код этой страницы оказывается, что в canonical висит двойной urlencode тега. Боты запрашивают канонический адрес, там снова происходит кодирование адреса, и так повторяется до бесконечности. И все эти адреса залетают в индекс. "Временный" фикс:Открыть /admin/applications/core/modules_public/search/search.phpНайти $this->registry->output->addCanonicalTag( 'app=core&module=search&do=search&search_tags=' . IPSText::urlencode_furlSafe( $this->request['search_tags'] ) . '&search_app=' . $this->request['search_app']. $extra, $this->request['search_tags'], 'tags' ); Заменить на $this->registry->output->addCanonicalTag( 'app=core&module=search&do=search&search_tags=' . IPSText::urlencode_furlSafe( IPSSearchRegistry::get('in.raw_search_tags') ) . '&search_app=' . $this->request['search_app']. $extra, $this->request['search_tags'], 'tags' ); 2 Link to comment Share on other sites More sharing options...
Zero108 Posted December 28, 2013 Share Posted December 28, 2013 Это можно в баг трекер запостить на IPS? 1 Link to comment Share on other sites More sharing options...
Атаман Posted December 28, 2013 Share Posted December 28, 2013 Это можно в баг трекер запостить на IPS? Скорее всего да чем нет). Link to comment Share on other sites More sharing options...
siv1987 Posted December 28, 2013 Author Share Posted December 28, 2013 Можно, и наверное даже нужно. Link to comment Share on other sites More sharing options...
Zero108 Posted December 28, 2013 Share Posted December 28, 2013 Попробовал запостить. Не уверен, что до конца уловил смысл. Link to comment Share on other sites More sharing options...
siv1987 Posted December 28, 2013 Author Share Posted December 28, 2013 Суть в том, что в индексе (там, где не запрещены теги к индексации) появляются куча пустых страниц, и берутся они с большой долей вероятности не откуда как из битого тега rel canonical. http://www.google.ru/#newwindow=1&q=site:www.a108.net+inurl:tags Для себя я еще настроил 404 код если темы не найдены, чтобы отвалились все левые адреса. Открыть admin\applications\core\modules_public\search\search.php Найти /* Output */ $this->title = $this->lang->words['search_results']; Добавить выше if ( $count < 1 ) { $this->registry->output->setHeaderCode( 404 ); } 3 Link to comment Share on other sites More sharing options...
Zero108 Posted December 28, 2013 Share Posted December 28, 2013 А у меня на форуме есть такие пустые страницы? Link to comment Share on other sites More sharing options...
siv1987 Posted December 28, 2013 Author Share Posted December 28, 2013 Дублирующие по крайней мере есть. Все что содержит %2525 является производным. Чпу ссылки в гугле должны выглядеть естественно. 1 Link to comment Share on other sites More sharing options...
siv1987 Posted January 8, 2014 Author Share Posted January 8, 2014 @Zero108, вы можете редактировать топик на ИПС? Там нужно поменять urlencode на urlencode_furlSafe, потому что в 3.4.5 она отличается по результату с стандартной функции urlencode (вместо разделителя слов +, теперь это %2B). Link to comment Share on other sites More sharing options...
Zero108 Posted January 9, 2014 Share Posted January 9, 2014 У меня 3.4.6. Баг-рапорты не редактируются вообще, будучи один раз запощёнными. Что написать под баг-рапортом и что изменить в коде на моем сайте? Link to comment Share on other sites More sharing options...
siv1987 Posted January 9, 2014 Author Share Posted January 9, 2014 urlencode(на IPSText::urlencode_furlSafe( Link to comment Share on other sites More sharing options...
Zero108 Posted January 9, 2014 Share Posted January 9, 2014 проверьте Link to comment Share on other sites More sharing options...
Testweb Posted January 8, 2016 Share Posted January 8, 2016 Прошло столько времени, все равно появляются ошибки с тегами... Link to comment Share on other sites More sharing options...
siv1987 Posted January 9, 2016 Author Share Posted January 9, 2016 Исправьте баг, со временем они должны выпасть из индекса. Время обновления выдачи зависит от скорости переиндексации. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now