getBaseUrl(); $url = rtrim($baseUrl, '/'); if (substr($baseUrl, strlen($baseUrl) - 9) == 'index.php') { $url = substr($baseUrl, 0, strlen($baseUrl) - 10); } return $url; } }