Use better addressing scheme for old pages
The subsection indexes should be addressed as directories (URLs ending with a slash). Instead of the non-canonical `section.html` vs `section/section.html`. (Have not yet updated the links.) Also: - Moved the legacy redirects from index.php to .htaccess. - Made the test runner return 1 on failure and print number of failed tests. - Improve test failure message on missing expected redirect.
This commit is contained in:
@@ -228,14 +228,10 @@ if ($page !== '') {
|
||||
}
|
||||
if ($page == 'mcr_2009') {
|
||||
include "./pages/mcr_2009/mcr_2009$jazycek.php";
|
||||
} elseif ($page == 'mcr_2009/probihani_loucna') {
|
||||
include "./pages/mcr_2009/probihani_loucna/probihani_loucna$jazycek.php";
|
||||
} elseif ($page == 'clanky') {
|
||||
include "./pages/clanky/clanky$jazycek.php";
|
||||
} elseif ($page == 'akce_ob') {
|
||||
include "./pages/akce_ob/akce_ob$jazycek.php";
|
||||
} elseif ($page == 'akce_litvinov') {
|
||||
include "./pages/akce_litvinov/akce_litvinov$jazycek.php";
|
||||
} elseif ($page == 'ski_krusnohori') {
|
||||
include './pages/ski_krusnohori/ski_krusnohori' . $jazycek . '.php';
|
||||
} elseif ($lang === 'cs' && file_exists(__DIR__ . "/pages/$escaped_page.php")) {
|
||||
include "./pages/$escaped_page.php";
|
||||
} elseif (file_exists(__DIR__ . "/pages/$escaped_page-$lang.php")) {
|
||||
|
||||
Reference in New Issue
Block a user