Fix replacement of sitemap entry in robot.txt
This commit is contained in:
parent
0d391ec185
commit
071fe087fd
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user