Open ogolovanov opened 8 years ago
For Google this is different :
At a group-member level, in particular for allow and disallow directives, the most specific rule based on the length of the [path] entry will trump the less specific (shorter) rule. The order of precedence for rules with wildcards is undefined.
From https://yandex.com/support/webmaster/controlling-robot/robots-txt.xml?lang=ru#simultaneous
$c = <<<ROBOTS
User-agent: *
Allow: /
Allow: /catalog/auto
Disallow: /catalog
ROBOTS;
$r = new RobotsTxtParser($c);
$url = 'http://test.ru/catalog/';
var_dump($r->isDisallowed($url));
Result: false Expected result: true