Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Adding (or removing) "www" without mod_rewrite
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andrew Stone  
View profile  
 More options Aug 7 2008, 8:37 am
From: "Andrew Stone" <stoneli...@gmail.com>
Date: Thu, 7 Aug 2008 08:37:54 -0400
Local: Thurs, Aug 7 2008 8:37 am
Subject: Re: Adding (or removing) "www" without mod_rewrite

On Thu, Aug 7, 2008 at 8:19 AM, RSL <sco...@gmail.com> wrote:

> 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

It would only cost you an extra request one time though.  After it is set,
you should be good.   You will have to test each request or store something
in the session to flag that the test has been done.  I'm guessing storing a
true/false value in the session to denote whether the test has been done
will be faster than testing the actual request.subdomains for "www" every
time.

--
Andrew Stone


 
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.