From 071fe087fd2a953aa2109bb8f223402bba1f585b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Apr 2021 11:29:47 +0200 Subject: [PATCH] Fix replacement of sitemap entry in robot.txt --- htdocs/website/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 68df5208d84..e9af12a7dd6 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2414,7 +2414,7 @@ if ($action == 'generatesitemaps' && $usercanedit) { $robotsitemap = "Sitemap: ".$domainname."/".$xmlname; $result = strpos($robotcontent, 'Sitemap: '); if ($result) { - $result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent); + $result = preg_replace('/Sitemap:.*/', $robotsitemap, $robotcontent); $robotcontent = $result ? $result : $robotcontent; } else { $robotcontent .= $robotsitemap."\n";