Skip to content

Instantly share code, notes, and snippets.

@timmillwood
Created October 22, 2012 15:38
Show Gist options
  • Save timmillwood/3932121 to your computer and use it in GitHub Desktop.
Save timmillwood/3932121 to your computer and use it in GitHub Desktop.
sinatra redirect
before do
if ['www.millwoodonline.com', 'millwoodonline.com', 'millwoodonline.co.uk'].include? request.host
redirect "http://www.millwoodonline.co.uk" + request.path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment