diff --git a/src/CoolApi/Core/Router.php b/src/CoolApi/Core/Router.php index e31ae04..e26f135 100644 --- a/src/CoolApi/Core/Router.php +++ b/src/CoolApi/Core/Router.php @@ -244,7 +244,7 @@ private function route ($route, $method) { } // If the route is empty, load the home route. - $route = '/' . $route; + $route = ($route === '/' ? '' : '/') . $route; /** * Handle routes with parameters in the URL.