6ef8d18297
- Unsure PHP_EOL is the best here : PHP_EOL are not the same on *nux and win, it's not for server , but for browser - _content vs _init : seems not really a web content ?
28 lines
442 B
PHP
28 lines
442 B
PHP
<?php
|
|
/**
|
|
* return the default robots.txt
|
|
* @version 0.1.1
|
|
*/
|
|
|
|
/**
|
|
* Simple robots.txt
|
|
* @param App $a
|
|
* @return void
|
|
*/
|
|
function robots_txt_init(App $a) {
|
|
|
|
/** @var string[] globally disallowed url */
|
|
$allDisalloweds = array(
|
|
"/settings/",
|
|
"/admin/",
|
|
"/message/",
|
|
);
|
|
|
|
header("Content-Type: text/plain");
|
|
echo "User-agent: *\n";
|
|
foreach($allDisalloweds as $disallowed) {
|
|
echo "Disallow: {$disallowed}\n";
|
|
}
|
|
killme();
|
|
}
|