public function url($url, $xhtml = true, $ssl = null)
	{
		if ((strpos($url, '&') !== 0)
		 && (strpos($url, 'index.php') !== 0))
		{
			return $url;
		}

		// Build route.
		$uri = $this->build($url);
		$url = $uri->toString(array('scheme', 'host', 'port', 'path', 'query', 'fragment'));

		// Replace spaces.
		$url = preg_replace('/\s/u', '%20', $url);

		// Get the secure/unsecure URLs.
		//
		// If the first 5 characters of the BASE are 'https', then we are on an ssl connection over
		// https and need to set our secure URL to the current request URL, if not, and the scheme is
		// 'http', then we need to do a quick string manipulation to switch schemes.
		if ((int) $ssl)
		{
			/*static $prefix;

			if (!$prefix)
			{
				$prefix = \App::get('request');
			}*/

			// Determine which scheme we want.
			$scheme = ((int) $ssl === 1) ? 'https' : 'http';

			// Make sure our URL path begins with a slash.
			if (!preg_match('#^/#', $url))
			{
				$url = '/' . $url;
			}

			// Build the URL.
			$url = $scheme . '://' . $this->prefix . $url;
		}

		if ($xhtml)
		{
			$url = htmlspecialchars($url);
		}

		return $url;
	}