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.

.
β”œβ”€β”€ 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 to the vhost config.

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.