This is a simple docker image to handle domain redirects.
Use REDIRECT* environment variables to configure redirects. The value
of each such variable should be in the syntax of source==target, where
source is a regular expression, and target is the URL to redirect to.
For example:
REDIRECT1=.*\.example\.com==https://www.google.com
By default, the redirect is a Temporary Redirect (302). To use a Permanent Redirect (301), prefix the target with an exclamation mark:
REDIRECT1=example.com==!https://www.google.com
$ docker run --rm -it -p 3000:3000 \
-e REDIRECT1=.*\.local==https://www.google.com \
-e REDIRECT2=.*\.lvh.me==https://github.com \
dannyben/redirector
version: '3'
services:
web:
image: dannyben/redirector
ports: ["3000:3000"]
environment:
REDIRECT1: .*\.local==https://www.google.com \
REDIRECT2: .*\.lvh.me==https://github.com \
Content type
Image
Digest
Size
8.2 MB
Last updated
over 5 years ago
docker pull dannyben/redirector