Please see this

http://docs.heroku.com/custom-domains


Thanks and regards,
Shyam Mohan
Ruby on rails developer at CRYPSIS <http://crypsis.net/> (Gurgaon)
Email : sh...@crypsis.net
Mobile : +91-971-618-9650
Web :  shyam.heroku.com


On Thu, Dec 2, 2010 at 3:14 AM, CuriousNewbie <bhellm...@gmail.com> wrote:

> Hello I'm looking to learn how to redirect all non-www (mysite.com) to
> https://www.mysite.com
>
> I tried the following:
>
> class ApplicationController < ActionController::Base
>
>  before_filter :check_uri
>
>
>  def check_uri
>    redirect_to request.protocol + "www." + request.host_with_port +
> request.request_uri if !/^www/.match(request.host) if Rails.env ==
> 'production'
>  end
>
>
> Problem with this is since the SSL cert on Heroku is for www.mysite.com,
> and not mysite.com, the browser throws the nasty SSL HTTPS invalid
> warning.
>
> Any ideas on how to redirect in a way that avoids the nasty SSL HTTPs
> invalid warning?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to