|
|
@ -311,15 +311,23 @@ foreach($index->search('') |
|
|
|
|
|
|
|
|
|
|
|
if ($url = $link->getAddress()) |
|
|
|
if ($url = $link->getAddress()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//Make relative links absolute |
|
|
|
// Convert relative links to absolute |
|
|
|
$url = \Yggverse\YoTools\Link::relative2absolute( |
|
|
|
$address = new \Yggverse\Net\Address( |
|
|
|
$document->get('url'), |
|
|
|
$url |
|
|
|
$url, |
|
|
|
); |
|
|
|
$scheme, |
|
|
|
|
|
|
|
$host, |
|
|
|
if ($address->isRelative()) |
|
|
|
$port, |
|
|
|
{ |
|
|
|
|
|
|
|
$base = new \Yggverse\Net\Address( |
|
|
|
|
|
|
|
$document->get('url') |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($absolute = $address->getAbsolute($base)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$url = $absolute; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Regex rules |
|
|
|
// Regex rules |
|
|
|
if (!preg_match($config->cli->document->crawl->url->regex, $url)) |
|
|
|
if (!preg_match($config->cli->document->crawl->url->regex, $url)) |
|
|
|
{ |
|
|
|
{ |
|
|
|