t1gor / Robots.txt-Parser-Class

Php class for robots.txt parse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User-agent directives is merged

JanPetterMG opened this issue · comments

I can't seem to find the problem yet, but I'm pretty sure the checkRule function itself is not the case here.

Example robots.txt

User-agent: *
Disallow: /temp

User-agent: Googlebot
Disallow: /admin
var_dump($parser->isAllowed("/temp","googlebot"));

Returns bool(false)
Shuld return bool(true)

According to Google's robots.txt tester, the /temp path is allowed for googlebot only (in this case)...

I discovered this in the EmptyDisallow.php test, after fixing it (was bugged). For now I'm gonna comment it out, because the tests fail for no reason in my recent pull request #33

Fixed with upcoming bug-fix #35. Closing this issue.