Skip to content

Commit 3acdd92

Browse files
authored
Update UrlWithoutSlash.php
Fix redirect rulle for main page
1 parent 2109678 commit 3acdd92

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UrlWithoutSlash.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ class UrlWithoutSlash
1717
public function handle($request, Closure $next)
1818
{
1919

20-
if(mb_substr($request->getPathInfo(),-1)=='/'){
21-
$uri = $request->getRequestUri();
20+
if(mb_substr($request->getPathInfo(),-1)=='/' && ($uri = $request->getRequestUri())!='/'){
2221
if(mb_substr($uri,0,mb_stripos($uri,'?')) != ''){
2322
$new_uri = mb_substr($uri,0,mb_stripos($uri,'?')-1).mb_substr($uri,mb_stripos($uri,'?'));
2423
}else{

0 commit comments

Comments
 (0)