diff --git a/docs/20_Installation.md b/docs/20_Installation.md new file mode 100644 index 0000000000000000000000000000000000000000..a274efa067c8c45078a98a5d11bb8b450f9abe2c --- /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 4926e555cf0bbe5b14ac12cb4ec2ba726dbda34f..0897a78f682089badcb3ee2fe11826cfd3c3053e 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 b1867046c4c0fd5a746360c3d491c307264078c6..0000000000000000000000000000000000000000 --- 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.