effacement d'un robot.txt inexistant
This commit is contained in:
parent
ee06dca830
commit
5f148baad5
|
@ -900,7 +900,9 @@ class common {
|
||||||
// Update robots.txt file in output directory
|
// Update robots.txt file in output directory
|
||||||
|
|
||||||
if ($this->getData(['config','seo', 'robots']) === true) {
|
if ($this->getData(['config','seo', 'robots']) === true) {
|
||||||
unlink('robots.txt');
|
if (file_exists('robots.txt')) {
|
||||||
|
unlink('robots.txt');
|
||||||
|
}
|
||||||
$sitemap->updateRobots();
|
$sitemap->updateRobots();
|
||||||
} else {
|
} else {
|
||||||
file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');
|
file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');
|
||||||
|
|
Loading…
Reference in New Issue