Sign inSign up

luizeof/http-redirect

By luizeof

Updated about 6 years ago

Redirect all HTTP requests on port 80 to the root path specified with 301 Http status.

Image
0

1.1K

luizeof/http-redirect repository overview

HTTP redirect

Inspired by ianneub/redirect.

This docker image redirect all HTTP requests on port 80 to the root path specified in the REDIRECT environment variable with 301 Http status.

The ENV REDIRECT need to be populated with entire URI will be sent to the redirected path.

Example with jwilder/nginx-proxy

bash docker run -d \
 -P \
 -e VIRTUAL_HOST="www.luizeof.com" \
 -e REDIRECT="https://luizeof.com" \
 --restart=always \
 luizeof/http-redirect

This will redirect all traffic from www.luizeof.com to https://luizeof.com.

This image also works with SSL on nginx-proxy-companion or some load balancer like traefik.

Tag summary

Content type

Image

Digest

Size

69.7 MB

Last updated

about 6 years ago

docker pull luizeof/http-redirect