mirror of
https://github.com/friendica/friendica
synced 2024-12-23 13:20:21 +00:00
Simple robots.txt for server 404 log
This commit is contained in:
parent
0b8f80c747
commit
4942c97785
1 changed files with 29 additions and 0 deletions
29
mod/robots_txt.php
Normal file
29
mod/robots_txt.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* return the default robots.txt
|
||||||
|
* @version 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple robots.txt
|
||||||
|
* @inheritdoc (?)
|
||||||
|
*/
|
||||||
|
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";
|
||||||
|
echo "Disallow:\n";
|
||||||
|
echo "\n";
|
||||||
|
echo "User-agent: *\n";
|
||||||
|
foreach($allDisalloweds as $disallowed) {
|
||||||
|
echo "Disallow: {$disallowed}\n";
|
||||||
|
}
|
||||||
|
killme();
|
||||||
|
}
|
Loading…
Reference in a new issue