diff --git a/public_html/admin/index.php b/public_html/admin/index.php index 74c931cf6babd09c289c1569cc8aa4abda0a9943..f09c4897bb47ad6434516e32bac79df9227e3d15 100644 --- a/public_html/admin/index.php +++ b/public_html/admin/index.php @@ -26,7 +26,7 @@ $aIco=[ 'h1'=>'⏩', 'h2_head'=>'✔️', - 'h2_err'=>'🔔', + 'h2_err'=>'⚠️', 'h2_config'=>'🛠️', 'h2_file'=>'📄', @@ -71,7 +71,7 @@ if (!$oR->isEnabled()){ if ($sUrl){ $sResult=$oR->httpGet($sUrl,1); echo '<h2>Response of a http HEAD request to '.$aIco['url'].' <a href="'.$sUrl.'">'.$sUrl.'</a></h2>' - . $oR->renderHttpResponseHeader($sResult, 1) + . $oR->renderHttpResponseHeader($sResult) ; return true; } @@ -145,7 +145,7 @@ if (!$oR->isEnabled()){ .'<td class="type-'.$sType.'">'.$sType.'</td>' .'<td class="type-'.$sType.'">' .($sType == 'direct' - ? '<a href="?url=http://'.$sHost.'/'.$sFrom.'" title="click to test http://'.$sHost.'/'.$sFrom.'" onclick="showInOverlay(this); return false;">/'.$sFrom.'</a>' + ? '<a href="?url=http://'.$sHost.$sFrom.'" title="click to test http://'.$sHost.'/'.$sFrom.'" onclick="showInOverlay(this); return false;">'.$sFrom.'</a>' : $sFrom ) .'</td>' diff --git a/public_html/admin/main.css b/public_html/admin/main.css index 224eebe01ee21135fc46250bd46fceb738f863d4..7b23959c2995b327c6ab6692c426817bcac4b9ed 100644 --- a/public_html/admin/main.css +++ b/public_html/admin/main.css @@ -12,7 +12,7 @@ footer{background:rgba(0,0,0,0.03); margin-top: 4em; text-align: right;padding: .content{margin: 0 1em;} .legend{background: #fff; padding: 1em;} -.error{background: #fcc; padding: 0.2em 1em;} +.error{background: #fcc; padding: 0.2em 1.5em;} .warning{color:#651; background:#fec; padding: 0.2em 1em;} .cfgtype-alias{color:#89a;} diff --git a/public_html/classes/redirect.admin.class.php b/public_html/classes/redirect.admin.class.php index d11fbe0ffcca843ff61d96ecb6247703e3833291..9a1ed976c69ddc31599ab96b986100258b15b1fd 100644 --- a/public_html/classes/redirect.admin.class.php +++ b/public_html/classes/redirect.admin.class.php @@ -18,7 +18,7 @@ require_once 'redirect.class.php'; * 2022-05-23 v1.6 ah add http head check+render output; * 2022-05-31 v1.7 ah optical changes * 2023-08-28 v1.8 ah remove php warning if there is no config yet - * 2024-10-03 v1.9 ah php8 only: typed variables + * 2024-10-04 v1.9 ah php8 only: typed variables */ /** diff --git a/public_html/classes/redirect.class.php b/public_html/classes/redirect.class.php index 49e85b8a7221d0fea96115bbb56de51b3787e983..ae8b2e9986a1f5654ead6b828176a298614eb538 100644 --- a/public_html/classes/redirect.class.php +++ b/public_html/classes/redirect.class.php @@ -24,7 +24,7 @@ * 2020-05-06 v1.3 ah added aliases for multiple domains with the same config * 2020-05-06 v1.4 ah rewrite as class * 2023-08-28 v1.5 ah fix loop over config with missing regex section. - * 2024-10-03 v1.6 ah php8 only: typed variables + * 2024-10-04 v1.6 ah php8 only: typed variables */ /** @@ -55,7 +55,7 @@ class redirect * About message * @var string */ - protected string $sAbout = 'IML redirect <small>v1.4</small>'; + protected string $sAbout = 'IML redirect <small>v1.6</small>'; /** * Hostname diff --git a/public_html/index.php b/public_html/index.php index 46ee3078c9ec1bf85a31a61a9eac02f753a1772a..2dcec2a9acf66eaa0610080652dd81e3d258118a 100755 --- a/public_html/index.php +++ b/public_html/index.php @@ -17,9 +17,8 @@ require_once 'classes/redirect.class.php'; $sHostname = $_SERVER['SERVER_NAME']; -// find redirect ... the part between starting "/" to "?" or end of line -$sRequest = preg_replace('#^(.*)\?.*$#', "$1", substr($_SERVER['REQUEST_URI'], 1)); - +// find request ... the part between starting "/" to "?" or end of line +$sRequest = preg_replace('#^(.*)\?.*$#', "$1", substr($_SERVER['REQUEST_URI'], 0)); $oR=new redirect(); $oR->setDebug(isset($_GET['debugredirect']) && $_GET['debugredirect'] ? true : false);