From 08e8e1545c83b6a3ff1ab571fa3b90b27c062aa9 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Wed, 15 Jan 2025 13:20:40 +0100
Subject: [PATCH] small fix

---
 public_html/admin/index.php                  | 2 +-
 public_html/classes/redirect.admin.class.php | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/public_html/admin/index.php b/public_html/admin/index.php
index 7518eed..aa79f3c 100644
--- a/public_html/admin/index.php
+++ b/public_html/admin/index.php
@@ -149,7 +149,7 @@ if (!$oR->isEnabled()) {
                                 $sRelFrom = $sFrom;
                                 break;
                             case 'regex':
-                                $sRelFrom = $aTo['link'] ?? false;
+                                $sRelFrom = $aTo['link'] ?? ($sFrom == '.*' ? 'something' : false);
                                 break;
                         }
 
diff --git a/public_html/classes/redirect.admin.class.php b/public_html/classes/redirect.admin.class.php
index a2779a2..93517c9 100644
--- a/public_html/classes/redirect.admin.class.php
+++ b/public_html/classes/redirect.admin.class.php
@@ -164,8 +164,9 @@ class redirectadmin extends redirect
                 // $sReturn .= '<strong>'.$iJump.') HTTP status: '.$iStatus.' - '.$sUrl.'</strong><pre>'.$sBlock.'</pre>';
                 
 
-                $sWebhost=parse_url($sUrl, PHP_URL_HOST);
+                $sWebhost=preg_replace('/_$/', '', parse_url($sUrl, PHP_URL_HOST));
                 $sBox.="<div class=\"box $sStatus\">"
+                    // .$sUrl.'<br>'
                     .$sWebhost.'<br>'
                     . $this->_getIp($sWebhost)
                     .'</div>';
@@ -179,7 +180,7 @@ class redirectadmin extends redirect
         }
         $iHops = $iJump-1;
         $sReturn = '<br>'.($iHops > 0
-            ? 'Found hops: <strong>' . $iHops . '</strong>'
+            ? 'Found hops: <strong>' . $iHops . '</strong> '
             . ($iHops > 1 ? '<span class="warning"> ⚠️ Verify your redirect to skip unneeded hops.</span>' : '') . '<br><br>'
             . '<div>'.$sBox.'</div><br><br><br>'
             : ''
-- 
GitLab