From dc6b2e0c67e6063317f4447c480f5cf0fb727d2b Mon Sep 17 00:00:00 2001 From: "Felix W. Dekker" Date: Mon, 22 Mar 2021 22:25:07 +0100 Subject: [PATCH] Add favicon support --- README.md | 6 ++++++ index.php | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d79a025..411bfb5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ Redirection software ## Requirements PHP 7.3+ +## Development +```shell script +# Run local PHP web server +$> php -S localhost:8080 fwdkr.co +``` + ## Installation Copy these files into the desired directory. You may override settings from `phpliteadmin.php` in the file `phpliteadmin.config.php`. diff --git a/index.php b/index.php index e8f3c47..f97d68a 100644 --- a/index.php +++ b/index.php @@ -3,10 +3,14 @@ include_once("links.php"); $path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); -if ($path == "/admin") { - $_SERVER["PHP_SELF"] = $path; - include("phpliteadmin.php"); - exit(); +switch ($path) { + case "/admin": + $_SERVER["PHP_SELF"] = $path; + include("phpliteadmin.php"); + exit(); + case "/favicon.ico": + header("Location: https://fwdekker.com/favicon.ico"); + exit(); } $error = false; @@ -105,7 +109,7 @@ if ($target != null) { MIT License. Source code available on git. Consider reading the privacy policy. -
v1.0.7
+
v1.0.8