public function path($url) {
        $prefix = $this->config['url_prefix'];

        // If the url_prefix is absolute-path style but the url isn't, get only the
        // path from the URL before comparing against the prefix.
        if (preg_match('#^/#', $prefix) && preg_match('#^http#', $url)) {
            $url = parse_url($url, PHP_URL_PATH);
        }

        // Trim the prefix from the URL
        return substr($url, strlen($prefix));
    }