Remove print page
It is pointless nowadays.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
RewriteCond &%{QUERY_STRING} &page=([^&]+) [NC]
|
RewriteCond &%{QUERY_STRING} &page=([^&]+) [NC]
|
||||||
RewriteRule ^(maincg\.php)?$ %1.html [R=301,QSD,L]
|
RewriteRule ^((maincg|printcg)\.php)?$ %1.html [R=301,QSD,L]
|
||||||
|
|
||||||
RewriteRule pages/(.*)\.php $1.html [R=301,L]
|
RewriteRule pages/(.*)\.php $1.html [R=301,L]
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<a href="http://www.tojnar.cz/krk/mainkrk.php" target="_blank">Web KRK</a>
|
<a href="http://www.tojnar.cz/krk/mainkrk.php" target="_blank">Web KRK</a>
|
||||||
¦<a href="http://www.tojnar.cz/krk/mainkrk.php?page=mcr_2009/mcr_2009" target="_blank">MČR v rogainingu</a> ¦<a href="/printcg.php?page=<?= $page; ?>" target="_blank">Verze pro tisk</a>
|
¦<a href="http://www.tojnar.cz/krk/mainkrk.php?page=mcr_2009/mcr_2009" target="_blank">MČR v rogainingu</a>
|
||||||
|
|||||||
24
printcg.php
24
printcg.php
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
$page = $_GET['page'] ?? 'cyklogaining';
|
|
||||||
?>
|
|
||||||
<!doctype html public "-//W3C//DTD HTML 4.01//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
||||||
<link rel="stylesheet" href="/print.css" type="text/css">
|
|
||||||
<link type="image/png" href="/images/logo_krk16.png" rel="shortcut icon">
|
|
||||||
<title>Tisk</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="main">
|
|
||||||
<?php
|
|
||||||
$escaped_page = str_replace([')', '(', '\\', '"', "\'", ';', '{', '}', '$', '[', ']', '<', '>'], '', $page);
|
|
||||||
if (file_exists("pages/$escaped_page.php")) {
|
|
||||||
include "./pages/$escaped_page.php";
|
|
||||||
} else {
|
|
||||||
include './pages/404.php';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user