Correct $url argument
stanislav-reshetnev opened this issue · comments
Stanislav Reshetnev commented
Please rename $url argument of RobotsTxtParser::isAllowed().
It's not URL but URL-path. We need to pass the path part of URL, not whole URL.
For example, we have the rule:
Disallow: /
It will be converted to 'rules' => ('disallow' => '/.*')
And if we wll pass $url = 'http://domain.com/path/file' to isAllowed(), it wouldn't work properly.
Or You must detect URLs with protocol and hostname assigned in $url.