pub / serci

Search the web with !keywords
git clone https://https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit 951ed1d753d9b9c4a488ce3108ce3a4972c0dd4f
parent 1b3b28afb764e52e54114098542371e1313140af
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Wed, 10 Jul 2024 22:02:58 +0200

feat: add htaccess and 404 file

Diffstat:
A.htaccess | 17+++++++++++++++++
A404.html | 23+++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/.htaccess b/.htaccess @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: 2024 JayVii <jayvii-serci[AT]posteo[DOT]de> + +# Set 404 Document +ErrorDocument 404 /404.html + +# Disallow file browsing +Options -Indexes + +# Disallow browsing of certain sub-directories (redirect to 404) +RedirectMatch 404 ^/config/.*$ +RedirectMatch 404 ^/lib/.*$ +RedirectMatch 404 ^/LICENSES/.*$ +RedirectMatch 404 ^/.reuse/.*$ +RedirectMatch 404 ^/.git/.*$ +RedirectMatch 404 ^/README.md$ +RedirectMatch 404 ^/.htaccess$ diff --git a/404.html b/404.html @@ -0,0 +1,23 @@ +<!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"> + <title>Error - 404</title> + <link rel="stylesheet" href="/assets/css/simple.css"> + <link rel="icon" type="image/png" href="/assets/img/favicon.png"> + </head> + <body> + <header> + <h1>Not found (404)</h1> + </header> + <h2>serĉi could not find, what you were looking for</h2> + <p> + Looks like you tried to access a feature that does not exits... + If you believe this is an error, please let us know! + </p> + <button onclick="window.history.back();">Go back!</button> + <br> + </body> +</html>