Redirects all GET requests from www.example.com to example.com (or similar) using Sinatra
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Gemfile
Gemfile.lock
config.ru
config.yaml
readme.md

readme.md

Redirect all GET requests from somewhere to somewhere else.

Handy for sites on Heroku where you want to have www.example.com/something redirect gracefully to just example.com/something.

Just edit config.yaml