RewriteRule ^(.*)$ http://tenkyuu.dev/$1 [R=301,L]
#error pages
-ErrorDocument 404 /error_docs/404.html
+ErrorDocument 401 /error_docs/401.html
ErrorDocument 403 /error_docs/403.html
-ErrorDocument 500 /error_docs/500.html
\ No newline at end of file
+ErrorDocument 404 /error_docs/404.html
+ErrorDocument 500 /error_docs/500.html
+ErrorDocument 502 /error_docs/502.html
+ErrorDocument 503 /error_docs/503.html
+ErrorDocument 504 /error_docs/504.html
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
+ <meta name="description" content="Unathorized access.">
+ <title>page doesn't exist!!</title>
+</head>
+<body background="/images/backgrounds/backgroundclouds.gif">
+ <h1>This page requires authenticaion!</h1>
+ <p>Are you just trying to access this page? Smells fishy, huh?!</p>
+ <a href="/">
+ <img src="/images/gifs/backhomepage.gif" width="300" alt="back to home">
+ </a>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
+ <meta name="description" content="Bad Gateway...">
+ <title>page doesn't exist!!</title>
+</head>
+<body background="/images/backgrounds/backgroundclouds.gif">
+ <h1>The Gateway is BADASS.</h1>
+ <p>There's a gate problem, it won't budge. It might been stuck.</p>
+ <a href="/">
+ <img src="/images/gifs/backhomepage.gif" width="300" alt="back to home">
+ </a>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
+ <meta name="description" content="The server can't serve.">
+ <title>page doesn't exist!!</title>
+</head>
+<body background="/images/backgrounds/backgroundclouds.gif">
+ <h1>Service is unavailable for some reason...</h1>
+ <p>Wait, the waiter is still serving other people. Give some time to him, he's doing his best.</p>
+ <a href="/">
+ <img src="/images/gifs/backhomepage.gif" width="300" alt="back to home">
+ </a>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
+ <meta name="description" content="Timeout!">
+ <title>page doesn't exist!!</title>
+</head>
+<body background="/images/backgrounds/backgroundclouds.gif">
+ <h1>You're too slow.</h1>
+ <p>The gate has a timer, you didn't reached it.</p>
+ <a href="/">
+ <img src="/images/gifs/backhomepage.gif" width="300" alt="back to home">
+ </a>
+</body>
+</html>
\ No newline at end of file
+++ /dev/null
-<?php
-$urlPath = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
-$urlPath = rtrim($urlPath, "/");
-$fullPath = $urlPath === "" ? "/" : $urlPath;
-
-if ($handle = opendir(".")) {
- echo "<html>";
- echo "<head><title>Index of $fullPath</title></head>";
- echo "<body>";
- echo "<h1>Index of $fullPath</h1><hr><pre>";
- echo '<a href="../">../</a>' . PHP_EOL;
-
- $items = [];
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != ".." && $entry != "index.php") {
- $items[] = $entry;
- }
- }
- closedir($handle);
-
- sort($items);
-
- foreach ($items as $entry) {
- $filePath = "./" . $entry;
- $lastModified = date("d-M-Y H:i", filemtime($filePath));
- $size = is_dir($filePath) ? "-" : filesize($filePath);
- $link = htmlspecialchars($entry);
-
- if (is_dir($filePath)) {
- $link .= '/';
- }
-
- echo "<a href=\"$entry\">$link</a>" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
- }
-
- echo "</pre><hr>";
- echo "</body>";
- echo "</html>";
-} else {
- echo "Unable to open directory.";
-}
-?>
\ No newline at end of file
+++ /dev/null
-<?php
-$urlPath = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
-$urlPath = rtrim($urlPath, "/");
-$fullPath = $urlPath === "" ? "/" : $urlPath;
-
-if ($handle = opendir(".")) {
- echo "<html>";
- echo "<head><title>Index of $fullPath</title></head>";
- echo "<body>";
- echo "<h1>Index of $fullPath</h1><hr><pre>";
- echo '<a href="../">../</a>' . PHP_EOL;
-
- $items = [];
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != ".." && $entry != "index.php") {
- $items[] = $entry;
- }
- }
- closedir($handle);
-
- sort($items);
-
- foreach ($items as $entry) {
- $filePath = "./" . $entry;
- $lastModified = date("d-M-Y H:i", filemtime($filePath));
- $size = is_dir($filePath) ? "-" : filesize($filePath);
- $link = htmlspecialchars($entry);
-
- if (is_dir($filePath)) {
- $link .= '/';
- }
-
- echo "<a href=\"$entry\">$link</a>" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
- }
-
- echo "</pre><hr>";
- echo "</body>";
- echo "</html>";
-} else {
- echo "Unable to open directory.";
-}
-?>
\ No newline at end of file
$fullPath = $urlPath === "" ? "/" : $urlPath;
if ($handle = opendir(".")) {
- echo "<html>";
- echo "<head><title>Index of $fullPath</title></head>";
- echo "<body>";
- echo "<h1>Index of $fullPath</h1><hr><pre>";
- echo '<a href="../">../</a>' . PHP_EOL;
+ echo "<html>";
+ echo "<head><title>Index of $fullPath</title></head>";
+ echo "<body>";
+ echo "<h1>Index of $fullPath</h1><hr><pre>";
+ echo '<a href="../">../</a>' . PHP_EOL;
- $items = [];
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != ".." && $entry != "index.php") {
- $items[] = $entry;
- }
+ $items = [];
+ while (false !== ($entry = readdir($handle))) {
+ if ($entry != "." && $entry != ".." && $entry != "index.php") {
+ $items[] = $entry;
}
- closedir($handle);
+ }
+ closedir($handle);
- sort($items);
+ sort($items);
- foreach ($items as $entry) {
- $filePath = "./" . $entry;
- $lastModified = date("d-M-Y H:i", filemtime($filePath));
- $size = is_dir($filePath) ? "-" : filesize($filePath);
- $link = htmlspecialchars($entry);
+ foreach ($items as $entry) {
+ $filePath = "./" . $entry;
+ $lastModified = date("d-M-Y H:i", filemtime($filePath));
+ $size = is_dir($filePath) ? "-" : filesize($filePath);
+ $link = htmlspecialchars($entry);
- if (is_dir($filePath)) {
- $link .= '/';
- }
-
- echo "<a href=\"$entry\">$link</a>" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
+ if (is_dir($filePath)) {
+ $link .= '/';
}
- echo "</pre><hr>";
- echo "</body>";
- echo "</html>";
+ echo "<a href=\"$entry\">$link</a>" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
+ }
+
+ echo "</pre><hr>";
+ echo "</body>";
+ echo "</html>";
} else {
- echo "Unable to open directory.";
+ echo "Unable to open directory.";
}
?>
\ No newline at end of file
--- /dev/null
+<?php
+ $path = $_SERVER['DOCUMENT_ROOT'];
+ $path .= '/files';
+?>
+<?php include_once($path . '/index.php');?>
\ No newline at end of file
--- /dev/null
+<?php
+ $path = $_SERVER['DOCUMENT_ROOT'];
+ $path .= '/files';
+?>
+<?php include_once($path . '/index.php');?>
\ No newline at end of file
<?php
-$urlPath = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
-$urlPath = rtrim($urlPath, "/");
-$fullPath = $urlPath === "" ? "/" : $urlPath;
-
-if ($handle = opendir(".")) {
- echo "<html>";
- echo "<head><title>Index of $fullPath</title></head>";
- echo "<body>";
- echo "<h1>Index of $fullPath</h1><hr><pre>";
- echo '<a href="../">../</a>' . PHP_EOL;
-
- $items = [];
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != ".." && $entry != "index.php") {
- $items[] = $entry;
- }
- }
- closedir($handle);
-
- sort($items);
-
- foreach ($items as $entry) {
- $filePath = "./" . $entry;
- $lastModified = date("d-M-Y H:i", filemtime($filePath));
- $size = is_dir($filePath) ? "-" : filesize($filePath);
- $link = htmlspecialchars($entry);
-
- if (is_dir($filePath)) {
- $link .= '/';
- }
-
- echo "<a href=\"$entry\">$link</a>" . str_repeat(" ", 50 - strlen($link)) . "$lastModified" . str_repeat(" ", 10 - strlen($size)) . "$size" . PHP_EOL;
- }
-
- echo "</pre><hr>";
- echo "</body>";
- echo "</html>";
-} else {
- echo "Unable to open directory.";
-}
-?>
\ No newline at end of file
+ $path = $_SERVER['DOCUMENT_ROOT'];
+ $path .= '/files';
+?>
+<?php include_once($path . '/index.php');?>
\ No newline at end of file