X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRobotsTxt.php;h=a084c1f4a6caf97c168b501e7df2f2daa11a8b86;hb=96d2cddb54f3ea3ead6e43e5ca1f814ed6327987;hp=3648f6f9fba2186d1b60cf9c0385eae9aaf10f0c;hpb=1e6affada14f9a700f9f9809ee4c36ebeaa51af7;p=friendica.git diff --git a/src/Module/RobotsTxt.php b/src/Module/RobotsTxt.php index 3648f6f9fb..a084c1f4a6 100644 --- a/src/Module/RobotsTxt.php +++ b/src/Module/RobotsTxt.php @@ -1,27 +1,61 @@ . + * + */ 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: GPTBot' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + System::exit(); } }