From: RSL <sco...@gmail.com>
Date: Thu, 7 Aug 2008 08:19:54 -0400
Local: Thurs, Aug 7 2008 8:19 am
Subject: Re: Adding (or removing) "www" without mod_rewrite
Yes. You can indeed redirect based on if request.subdomains.first ==
"www". I've had to do so in the past when I couldn't change the Apache confs. It will cost an extra Rails request though, so if you can solve it by rewriting the configurations, that's probably preferable. RSL On Thu, Aug 7, 2008 at 7:35 AM, Andrew Stone <stoneli...@gmail.com> wrote:
> On Thu, Aug 7, 2008 at 6:02 AM, Peter Cooper <pcoo...@gmail.com> wrote: >> On Aug 7, 7:39 am, Peter Cooper <pcoo...@gmail.com> wrote: >> > For example, if I have a sitehttp://www.example.com/, I might want >> > I could always activate mod_rewrite and deal with it the classic way, >> Just to add in case it's useful for someone else, a few people have > Hey Peter, > Couldn't you use a before_filter on the application controller to test the > def redirect_to_ssl > unless (request.ssl? or RAILS_ENV == 'development') > end > Of course the before_filter is redirect_to_ssl. > Good luck, > -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||