Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

sparkswap/redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Now Redirect

Simple microservice to redirect to an url

Usage

If you haven't installed now already, start by following these instructions

To deploy the service use the following command:

now now-examples/redirect

You'll be asked to provide REDIRECT_URL. An example REDIRECT_URL is: https://www.example.com

After the deployment is complete you can create an alias for your custom domain:

now alias <unique-deployment-url> example.com

In this example you've made a redirect from:

https://example.com ⟶ https://www.example.com

302 redirects are better for 301s since they are not permanent. To use a 301, pass it as the STATUS environment variable, e.g.

STATUS=301; now

Use the STRIP_PATH environment variable to control whether the redirect includes the original path.

On now every subdomain is unique. So example.com and www.example.com can be 2 different instances. This is useful when you want to, for example, redirect from non-www to www.

Authors

About

Fork of now-examples/redirect - DEPRECATED

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •