protected function getPathFromUrl($url) { if (strpos($url, $this->baseUrl) === 0 && $url !== $this->baseUrl) { return str_replace($this->baseUrl, '', $url); } else { return $url; } }