Closed LeMoussel closed 7 years ago
If specify User Agent when call isUrlAllow() and the User Agent is not find in the content of the robots.txt file, isUrlAllow() not handled correctly if there is User-agent: * in content of robots.txt.
isUrlAllow()
User-agent: *
Robots.txt file
User-agent: * Disallow: /fr/
$robotsTxtValidator->isUrlAllow('http://site.com/fr/page2', 'MyUserAgent') => return True
$robotsTxtValidator->isUrlAllow('http://site.com/fr/page2', 'MyUserAgent')
If specify User Agent when call
isUrlAllow()
and the User Agent is not find in the content of the robots.txt file,isUrlAllow()
not handled correctly if there isUser-agent: *
in content of robots.txt.Robots.txt file
$robotsTxtValidator->isUrlAllow('http://site.com/fr/page2', 'MyUserAgent')
=> return True