From f2ac973c559d9c99d3f0f76c6316bd223eb8de81 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Thu, 14 Apr 2022 16:10:24 +0200 Subject: [PATCH] update docs --- docs/20_Installation.md | 43 +++++++++++++++++++ ...0_Configuration.md => 30_Configuration.md} | 2 +- docs/30_Installation.md | 21 --------- 3 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 docs/20_Installation.md rename docs/{20_Configuration.md => 30_Configuration.md} (94%) delete mode 100644 docs/30_Installation.md diff --git a/docs/20_Installation.md b/docs/20_Installation.md new file mode 100644 index 0000000..a274efa --- /dev/null +++ b/docs/20_Installation.md @@ -0,0 +1,43 @@ +# Installation # + +## Get the files ## + +The repository contains a subfolder *public_html*. Run `git clone` or extract the downloaded archive 1 level above webroot. The document root of the web must point +to the public_html directory. The config folder is outside the webroot. + +```text +. +├── config +│ ├── aliases.json.dist +│ └── redirects_domain.example.com.json.dist +├── docs +│ ├── ... +| └── ... +├── public_html +│ ├── admin.php +│ ├── classes +│ │ ├── redirect.admin.class.php +│ │ ├── redirect.admin.class.php_enabled.txt.dist +│ │ └── redirect.class.php +│ └── index.php +└── readme.md +``` + +## Redirect all requests to index.php ## + +Redirect all requests to the index.php. Activate the .htaccess or (better) +add the config of the htaccess file to the vhost config. + +```text +RewriteEngine On +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^.*$ /index.php [L] +``` + +In the DNS point all hostnames with redirects only to this server (i.e. with +a CNAME). + +If you don't have a single vhost in the webserver then additionally add the +domains to "catch" as ServerAlias. diff --git a/docs/20_Configuration.md b/docs/30_Configuration.md similarity index 94% rename from docs/20_Configuration.md rename to docs/30_Configuration.md index 4926e55..0897a78 100644 --- a/docs/20_Configuration.md +++ b/docs/30_Configuration.md @@ -1,7 +1,7 @@ # Configuration # -In the config folder are json files. Copy the dist files to the same filename without ".dist" +In the *./config/* folder are json files. Copy the dist files to the same filename without ".dist" * redirects_[FQDN].json * aliases.json diff --git a/docs/30_Installation.md b/docs/30_Installation.md deleted file mode 100644 index b186704..0000000 --- a/docs/30_Installation.md +++ /dev/null @@ -1,21 +0,0 @@ -# Installation # - -Extract archive 1 level above webroot. The document root of the web must point -to the public_html directory. The config folder is outside the webroot. - -Redirect all requests to the index.php. Activate the .htaccess or (better) -add the config of the htaccess file to the vhost config. - -```text -RewriteEngine On -RewriteBase / -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^.*$ /index.php [L] -``` - -In the DNS point all hostnames with redirects only to this server (i.e. with -a CNAME). - -If you don't have a single vhost in the webserver then additionally add the -domains to "catch" as ServerAlias. -- GitLab