X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRobotsTxt.php;h=83550f0ce8ed561d5d6be821b9c539ee3ebb46e0;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=3648f6f9fba2186d1b60cf9c0385eae9aaf10f0c;hpb=b79201beaf428b8a7ae5ecdc17cd80052b952eaf;p=friendica.git diff --git a/src/Module/RobotsTxt.php b/src/Module/RobotsTxt.php index 3648f6f9fb..83550f0ce8 100644 --- a/src/Module/RobotsTxt.php +++ b/src/Module/RobotsTxt.php @@ -1,27 +1,65 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; /** * Return the default robots.txt */ class RobotsTxt extends BaseModule { - public static function rawContent() + protected function rawContent(array $request = []) { - $allDisalloweds = [ + $allDisallowed = [ '/settings/', '/admin/', '/message/', + '/search', + '/help', + '/proxy', + '/photo', + '/avatar', ]; header('Content-Type: text/plain'); echo 'User-agent: *' . PHP_EOL; - foreach ($allDisalloweds as $disallowed) { + foreach ($allDisallowed as $disallowed) { echo 'Disallow: ' . $disallowed . PHP_EOL; } - exit(); + + echo PHP_EOL; + echo 'User-agent: ChatGPT-User' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + echo PHP_EOL; + echo 'User-agent: Google-Extended' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + echo PHP_EOL; + echo 'User-agent: GPTBot' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + System::exit(); } }