Module/System/src/Cmf/System/Application.php
public function killWww()
    {
        $host = $_SERVER['SERVER_NAME'];
        if (stripos($host, 'www.') === 0) {
            $host = substr_replace($host, '', 0, 4);
            $uri = $_SERVER['REQUEST_URI'];
            header("HTTP/1.1 301 Moved Permanently");

            if ('/' == $uri[0]) {
                header('Location: http://' . $host . $uri);
            } else {
                header('Location: http://' . $host . '/' . $uri);
            }

            die;
        }

        return $this;
    }
public function killWww()
    {
        $host = $_SERVER['SERVER_NAME'];
        if (stripos($host, 'www.') === 0) {
            $host = substr_replace($host, '', 0, 4);
            $uri = $_SERVER['REQUEST_URI'];
            header("HTTP/1.1 301 Moved Permanently");

            if ('/' == $uri[0]) {
                header('Location: http://' . $host . $uri);
            } else {
                header('Location: http://' . $host . '/' . $uri);
            }

            die;
        }

        return $this;
    }
public function killWww ( ) { $ host = $ _SERVER [ 'SERVER_NAME' ] ; if ( stripos ( $ host , 'www.' ) === 0 ) { $ host = substr_replace ( $ host , '' , 0 , 4 ) ; $ uri = $ _SERVER [ 'REQUEST_URI' ] ; header ( "HTTP/1.1 301 Moved Permanently" ) ; if ( '/' == $ uri [ 0 ] ) { header ( 'Location: http://' . $ host . $ uri ) ; } else { header ( 'Location: http://' . $ host . '/' . $ uri ) ; } die ; } return $ this ; }
Redirect from www.hostname to hostname

@return Application
Redirect from www . hostname to hostname