private function validateRequestURI(&$requestURI)
    {
        if ($requestURI != '/' && substr($requestURI, -1) == '/') {
            $url = rtrim($requestURI, '/');

            if (php_sapi_name() === 'cli') {
                exit("Please ensure the URL you typed in does not have a trailing backslash.\n");
            }

            header("Location: " . $url);
            exit();
        }
    }
private function validateRequestURI(&$requestURI)
    {
        if ($requestURI != '/' && substr($requestURI, -1) == '/') {
            $url = rtrim($requestURI, '/');

            if (php_sapi_name() === 'cli') {
                exit("Please ensure the URL you typed in does not have a trailing backslash.\n");
            }

            header("Location: " . $url);
            exit();
        }
    }
private function validateRequestURI ( & $ requestURI ) { if ( $ requestURI != '/' && substr ( $ requestURI , - 1 ) == '/' ) { $ url = rtrim ( $ requestURI , '/' ) ; if ( php_sapi_name ( ) === 'cli' ) { exit ( "Please ensure the URL you typed in does not have a trailing backslash.\n" ) ; } header ( "Location: " . $ url ) ; exit ( ) ; } }
Make sure the request URI fits how we want it to

@param string $requestURI
Make sure the request URI fits how we want it to