public function getURL($url, &$filepath = null)
    {
        $paths = $this->_paths;

        if (array_key_exists($url, $this->_urls)) {
            return $this->_urls[$url];
        }

        settype($paths, 'array'); //force to array

        $this->_urls[$url] = null;

        $base = $this->getService('application')->getRouter()->getBaseUrl();
        $file_path = null;
        $path = null;

        // start looping through the path set
        foreach ($paths as $path) {
            // get the path to the file
            $path = $path.DS.$url;

            // the substr() check added to make sure that the realpath()
            // results in a directory registered so that
            // non-registered directores are not accessible via directory
            // traversal attempts.
            $file_path = ANPATH_ROOT.DS.$path;

            //fixes windows file system issue
            $path = str_replace(DS, '/', $path);

            if (file_exists($file_path)) {
                break;
            }

            $file_path = null;
            $path = null;
        }

        if ($file_path) {
            $path = $base.'/'.$path;
            $this->_urls[$url] = $path;
            $this->_urls[$path] = $path;
            $this->_file_paths[$url] = $file_path;
            $this->_file_paths[$path] = $file_path;
        }

        $filepath = $this->getFilePath($url);

        return $this->_urls[$url];
    }