Skip to content
Snippets Groups Projects
Commit cb38f40e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update web files: Redirects and admin

parent e6ffbefe
No related branches found
No related tags found
1 merge request!57512 php83 update
......@@ -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>'
......
......@@ -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;}
......
......@@ -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
*/
/**
......
......@@ -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
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment