Skip to content

Commit

Permalink
Fix new lines in robots.php (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
pastakhov authored Aug 31, 2024
1 parent 1ca9e88 commit d9fb896
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _sources/configs/robots.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ini_set( 'display_errors', 0 );
error_reporting( 0 );

echo "# It generated by the robots.php file\n";
echo "# It generated by the robots.php file\n";

header( 'Content-Type: text/plain' );

Expand All @@ -24,15 +24,15 @@

$siteMapUrl = "$server$script/sitemap$subdir/sitemap-index-$identifier.xml";

echo "Sitemap: $siteMapUrl";
echo "Sitemap: $siteMapUrl\n";
}

readfile( 'robots.txt' );

// If the file `extra-robots.txt` is created under the name
// `/var/www/mediawiki/extra-robots.txt` then its contents get appended to the
// default `robots.txt` - see MW-312
if ( file_exists( 'extra-robots.txt' ) && is_readable( 'extra-robots.txt' ) ) {
if ( is_readable( 'extra-robots.txt' ) ) {
// Extra line to separate the files so that rules don't combine
echo "\n";
readfile( 'extra-robots.txt' );
Expand Down

0 comments on commit d9fb896

Please sign in to comment.