Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 858 Bytes

File metadata and controls

36 lines (24 loc) · 858 Bytes

REDIRECT SERVER

Simply NextJS project for redirecting requests to another uri.

Usage

Set as environment variable:

TO_URI=https://<uri>.com
or 
ALL_TO_URI=https://<uri>.com

TO_URI SAMPLE

http://old.domain.com/<slug*> -> <TO_URI>/<slug*> http://old.domain.com/ -> <TO_URI>/

ALL_TO_URI SAMPLE

http://old.domain.com/<slug*> -> <ALL_TO_URI> http://old.domain.com/ -> <ALL_TO_URI/

HOST_URIS SAMPLE

Per-host redirects for a single deployment serving multiple domains. Set a JSON map of host -> destination (matched by the request host header, evaluated before TO_URI/ALL_TO_URI):

HOST_URIS={"builders.tutellus.com":"https://tutellus.com/builders"}

http://builders.tutellus.com/<slug*> -> https://tutellus.com/builders http://builders.tutellus.com/ -> https://tutellus.com/builders