Skip to content

Instantly share code, notes, and snippets.

@julionc
Created November 28, 2012 02:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Redirect to Www for Heroku With SSL
# Taken from http://blog.bigbinary.com/2012/10/12/redirect-to-www-heroku-ssl.html
Bigbinary::Application.routes.draw do
constraints(:host => /^bigbinary.com/) do
root :to => redirect("http://www.bigbinary.com")
match '/*path', :to => redirect {|params| "http://www.bigbinary.com/#{params[:path]}"}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment