public function getPath($url)
    {
        $url = new URL($url);
        $to_replace = $this->url->path;
        $path = $url->path;

        if (strpos($path, $to_replace) === 0)
            $path = substr($path, strlen($to_replace));

        $path = '/' . urldecode($path);
        return $path; 
    }