diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php index 5aab448..54e603a 100644 --- a/app/Controllers/MainController.php +++ b/app/Controllers/MainController.php @@ -61,6 +61,13 @@ class MainController Page::set('FavAuthors'); } + public static function robots() { + echo 'User-Agent: * +Disallow: /lk/ +Clean-Param: vid&gid&upd /photo/ +Host: https://'.$_SERVER['SERVER_NAME']; +header("Content-Type: text/plain"); + } public static function logout() diff --git a/app/Core/Routes.php b/app/Core/Routes.php index 95d4f1a..b20d0ba 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -11,6 +11,7 @@ class Routes public static function init() { Router::get('/', 'MainController@i'); + Router::get('/robots.txt', 'MainController@robots'); Router::get('/t', 'MainController@t'); Router::get('/login', 'LoginController@i'); Router::get('/register', 'RegisterController@i');