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