Utils/ServerUtils.php
/**
     * Redirect to a different resource
     *
     * @param string $path to the resource without protocol and without host
     * @return bool|void
     */
Redirect to a different resource
@param string $path to the resource without protocol and without host
@return bool|void
Redirect to a different resource @param string $path to the resource without protocol and without host @return bool|void
public static function redirect($path = '')
    {
        $redirection = self::getProtocol() . '://' . $_SERVER['HTTP_HOST'] . '/' . ltrim($path, '/');
        if (self::getScriptUri(true) === $redirection) {
            return false;
        }
        if ($redirection !== self::getScriptUri(true)) {
            header('Location: ' . $redirection, true, 301);
            exit(-1);
        }
        return false;
    }
public static function redirect ( $ path = '' ) { $ redirection = self :: getProtocol ( ) . '://' . $ _SERVER [ 'HTTP_HOST' ] . '/' . ltrim ( $ path , '/' ) ; if ( self :: getScriptUri ( true ) === $ redirection ) { return false ; } if ( $ redirection !== self :: getScriptUri ( true ) ) { header ( 'Location: ' . $ redirection , true , 301 ) ; exit ( - 1 ) ; } return false ; }
Redirect to a different resource
 @param string $path to the resource without protocol and without host
 @return bool|void
Redirect to a different resource @param string $path to the resource without protocol and without host @return bool|void