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

add test link for regex ".*"

parent b657e76f
No related branches found
No related tags found
1 merge request!97728 handle http and https redirects
...@@ -144,7 +144,15 @@ if (!$oR->isEnabled()) { ...@@ -144,7 +144,15 @@ if (!$oR->isEnabled()) {
if (count($aCfg['redirects'][$sType])) { if (count($aCfg['redirects'][$sType])) {
foreach ($aCfg['redirects'][$sType] as $sFrom => $aTo) { foreach ($aCfg['redirects'][$sType] as $sFrom => $aTo) {
$iCount++; $iCount++;
$sRelFrom = $sType == 'direct' ? $sFrom : ($aTo['link'] ?? false ); switch ($sType) {
case 'direct':
$sRelFrom = $sFrom;
break;
case 'regex':
$sRelFrom = $aTo['link'] ?? false;
break;
}
$sTable .= $sTdFirst $sTable .= $sTdFirst
. '<td class="type-' . $sType . '">' . $sType . '</td>' . '<td class="type-' . $sType . '">' . $sType . '</td>'
. '<td class="type-' . $sType . '">' . '<td class="type-' . $sType . '">'
...@@ -268,7 +276,7 @@ if (!$oR->isEnabled()) { ...@@ -268,7 +276,7 @@ if (!$oR->isEnabled()) {
</head> </head>
<body> <body>
<h1><a href="?"> Redirects :: admin</a></h1> <h1><a href="?"><?php echo $oR->getTitle(); ?></a></h1>
<main> <main>
<?php echo $sErrors . $sHtml; ?> <?php echo $sErrors . $sHtml; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment