private function checkForTrailingSlashRedirect()
    {
        if (!empty($this->segments) && empty($this->segments[count($this->segments) - 1])) {
            //Trim off the empty segment
            array_pop($this->segments);

            $newUrl = $this->baseHREF . '/' . implode('/', $this->segments);

            header("Location: " . $newUrl);
            exit();
        }
    }
private function checkForTrailingSlashRedirect()
    {
        if (!empty($this->segments) && empty($this->segments[count($this->segments) - 1])) {
            //Trim off the empty segment
            array_pop($this->segments);

            $newUrl = $this->baseHREF . '/' . implode('/', $this->segments);

            header("Location: " . $newUrl);
            exit();
        }
    }
private function checkForTrailingSlashRedirect ( ) { if ( ! empty ( $ this -> segments ) && empty ( $ this -> segments [ count ( $ this -> segments ) - 1 ] ) ) { //Trim off the empty segment array_pop ( $ this -> segments ) ; $ newUrl = $ this -> baseHREF . '/' . implode ( '/' , $ this -> segments ) ; header ( "Location: " . $ newUrl ) ; exit ( ) ; } }
Checks for a trailing slash or something in the url
Checks for a trailing slash or something in the url