effacement d'un robot.txt inexistant

This commit is contained in:
Fred Tempez 2022-09-13 10:29:39 +02:00
parent ee06dca830
commit 5f148baad5

View File

@ -900,7 +900,9 @@ class common {
// Update robots.txt file in output directory
if ($this->getData(['config','seo', 'robots']) === true) {
unlink('robots.txt');
if (file_exists('robots.txt')) {
unlink('robots.txt');
}
$sitemap->updateRobots();
} else {
file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');