]> git.mxchange.org Git - friendica.git/blob - mod/robots_txt.php
Ops, one more left ...
[friendica.git] / mod / robots_txt.php
1 <?php
2
3 /**
4  * @file mod/robots_text.php
5  * @brief Module which returns the default robots.txt
6  * @version 0.1.2
7  */
8
9 use Friendica\App;
10
11 /**
12  * @brief Return default robots.txt when init
13  * @param App $a
14  * @return void
15  */
16 function robots_txt_init(App $a)
17 {
18         $allDisalloweds = [
19                 '/settings/',
20                 '/admin/',
21                 '/message/',
22         ];
23
24         header('Content-Type: text/plain');
25         echo 'User-agent: *' . PHP_EOL;
26         foreach ($allDisalloweds as $disallowed) {
27                 echo 'Disallow: ' . $disallowed . PHP_EOL;
28         }
29         killme();
30 }