Ignore urls with queries
This commit is contained in:
parent
14ebe2acd3
commit
e0368de59a
1 changed files with 8 additions and 1 deletions
|
|
@ -36,7 +36,14 @@ class Sitemap
|
|||
// Ignorer le tag dans tout les cas.
|
||||
return null;
|
||||
}
|
||||
})->filter();
|
||||
})->filter(function (?Tag $tag) {
|
||||
$queries = \collect(\parse_url($tag->getUrl(), \PHP_URL_QUERY))->filter();
|
||||
// ! Ignore null from previous or tags with urls that have Queries.
|
||||
if (!$tag or $queries->count()) {
|
||||
return null;
|
||||
}
|
||||
return $tag;
|
||||
});
|
||||
$this->assignPrioritiesAndFrequencies();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue