diff --git a/src/Middleware/IfIndex.php b/src/Middleware/IfIndex.php index 7a2b6e5..7ea949a 100644 --- a/src/Middleware/IfIndex.php +++ b/src/Middleware/IfIndex.php @@ -14,7 +14,7 @@ public function handle(Request $request, \Closure $next) if (strpos($uri, $name) !== false) { - $path = $request->path(); + $path = '/' . ltrim($request->path(), '/'); $query = $request->getQueryString(); if (null !== $query)