Skip to content

Instantly share code, notes, and snippets.

@julionc julionc/gist:4158704
Created Nov 28, 2012

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
You can’t perform that action at this time.