diff --git a/src/EventSubscriber/GlobalredirectSubscriber.php b/src/EventSubscriber/GlobalredirectSubscriber.php
index 26517e0..fb7f91b 100644
--- a/src/EventSubscriber/GlobalredirectSubscriber.php
+++ b/src/EventSubscriber/GlobalredirectSubscriber.php
@@ -127,7 +127,7 @@ class GlobalredirectSubscriber implements EventSubscriberInterface {
 
     $path_info = ltrim($event->getRequest()->getPathInfo(), '/');
     if (substr($path_info, -1, 1) === '/') {
-      $path_info = trim($path_info, '/');
+      $path_info = "/" . rtrim($path_info, '/');
       try {
         $path_info = $this->aliasManager->getPathByAlias($path_info);
         // Need to add the slash back.
@@ -149,7 +149,7 @@ class GlobalredirectSubscriber implements EventSubscriberInterface {
     }
 
     $request = $event->getRequest();
-    $path = trim($request->getPathInfo(), '/');
+    $path = "/" . trim($request->getPathInfo(), '/');
 
     // Redirect only if the current path is not the root and this is the front
     // page.
@@ -170,6 +170,8 @@ class GlobalredirectSubscriber implements EventSubscriberInterface {
       return;
     }
 
+    $path = '/' . $path;
+
     $system_path = $this->aliasManager->getPathByAlias($path);
     $alias = $this->aliasManager->getAliasByPath($system_path, $this->languageManager->getCurrentLanguage()
       ->getId());
