Created
November 28, 2012 02:42
-
-
Save julionc/4158704 to your computer and use it in GitHub Desktop.
Redirect to Www for Heroku With SSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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