Microweber\Controllers\DefaultController::robotstxt PHP Method

robotstxt() public method

public robotstxt ( )
    public function robotstxt()
    {
        header('Content-Type: text/plain');
        $robots = get_option('robots_txt', 'website');
        if ($robots == false) {
            $robots = "User-agent: *\nAllow: /" . "\n";
            $robots .= 'Disallow: /cache/' . "\n";
            $robots .= 'Disallow: /storage/' . "\n";
            $robots .= 'Disallow: /database/' . "\n";
            $robots .= 'Disallow: /vendor/' . "\n";
            $robots .= 'Disallow: /src/' . "\n";
            $robots .= 'Disallow: /userfiles/modules/' . "\n";
            $robots .= 'Disallow: /userfiles/templates/' . "\n";
        }
        event_trigger('mw_robot_url_hit');
        echo $robots;
        exit;
    }