Skip to content
Snippets Groups Projects
Commit c91fb623 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch 'hotline#117644_probleme_avec_les_bots' into 'hotline'

hotline#117644 : blocking robots from yandex

See merge request !3642
parents 8704bcc7 0baf8e4e
Branches
Tags
2 merge requests!3646Hotline,!3642hotline#117644 : blocking robots from yandex
Pipeline #11127 failed with stage
in 41 minutes and 37 seconds
- ticket #117644 : amélioration de la détection des robots d'indexation et de leur blocage
\ No newline at end of file
......@@ -32,7 +32,7 @@ class Class_UserAgent {
public function isBot() {
return 0 !== preg_match('/(bot\/|sistrix|voilabot|slurp|mauibot|ahrefsbot|semrushbot|qwant|bing|linguee|googlebot|mj12bot|dotbot|seokicks|seekport)/i',
return 0 !== preg_match('/(bot\/|sistrix|voilabot|slurp|mauibot|ahrefs|semrush|qwant|bing|linguee|googlebot|mj12bot|dotbot|seokicks|seekport|yandex)/i',
$this->_user_agent_string);
}
......
......@@ -46,9 +46,11 @@ class BotUserAgentTest extends PHPUnit_Framework_TestCase {
public function botUserAgents() {
return [
['Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'],
['Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)'],
['Mozilla/5.0 (Windows NT 5.1; U; Win64; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabot@orange-ftgroup.com)'],
['Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'],
['Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)'],
['Mozilla/5.0 (Windows NT 5.1; U; Win64; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabot@orange-ftgroup.com)'],
['Mozilla/5.0 (compatible; YandexBot/3.0)'],
['Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)']
];
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment