Redirection with Nginx-Proxy
How to set up full URL redirections using the PROXY_FULL_REDIRECT environment variable in Nginx-Proxy.
Redirection
Let's say you want to serve a website on example.uk
. You might want users visiting www.example.uk
,example.com
,www.example.com
to redirect to example.uk
. You can simply use PROXY_FULL_REDIRECT
environment variable.
-e 'VIRTUAL_HOST=https://example.uk -> :7000' \
-e 'PROXY_FULL_REDIRECT=example.com,www.example.com,www.example.uk->example.uk'