friendica/mod/robots_txt.php

28 lines
442 B
PHP
Raw Normal View History

2017-04-26 09:39:35 -04:00
<?php
/**
* return the default robots.txt
* @version 0.1.1
2017-04-26 09:39:35 -04:00
*/
/**
* Simple robots.txt
* @param App $a
* @return void
2017-04-26 09:39:35 -04:00
*/
function robots_txt_init(App $a) {
/** @var string[] globally disallowed url */
$allDisalloweds = array(
"/settings/",
"/admin/",
"/message/",
);
2017-04-26 09:39:35 -04:00
header("Content-Type: text/plain");
echo "User-agent: *\n";
foreach($allDisalloweds as $disallowed) {
echo "Disallow: {$disallowed}\n";
}
killme();
2017-04-26 09:39:35 -04:00
}