Received: by 10.66.73.37 with SMTP id i5mr216460pav.40.1349892844027; Wed, 10 Oct 2012 11:14:04 -0700 (PDT) X-BeenThere: nodejs@googlegroups.com Received: by 10.68.223.67 with SMTP id qs3ls3125921pbc.8.gmail; Wed, 10 Oct 2012 11:13:55 -0700 (PDT) Received: by 10.68.225.234 with SMTP id rn10mr6344896pbc.3.1349892835613; Wed, 10 Oct 2012 11:13:55 -0700 (PDT) Date: Wed, 10 Oct 2012 11:13:55 -0700 (PDT) From: CoolAJ86 To: nodejs@googlegroups.com Message-Id: In-Reply-To: References: <13deb259-0045-46ea-9857-09fae9afdd4f@c19g2000yqk.googlegroups.com> Subject: Re: [nodejs] Re: Redirecting from naked domain to www with node/express? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1364_5716970.1349892835272" ------=_Part_1364_5716970.1349892835272 Content-Type: multipart/alternative; boundary="----=_Part_1365_18789411.1349892835272" ------=_Part_1365_18789411.1349892835272 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit var nowww = require('nowww'); connect.use(nowww); I believe `express.use(nowww);` should work the same. https://npmjs.org/package/nowww https://github.com/coolaj86/steve/tree/master/connect-nowww On Wednesday, October 10, 2012 8:22:32 AM UTC-6, Felix E. Klee wrote: > > On Tue, Oct 9, 2012 at 10:12 PM, Isaac Schlueter > > wrote: > > You can also use canonical-host for this: [...] > > Thanks! It's good to know the options. > ------=_Part_1365_18789411.1349892835272 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
var nowww = require('nowww');

connect.use(nowww);

I believe `express.use(nowww);` should work the same.



https://npmjs.org/package/nowww

https://github.com/coolaj86/steve/tree/master/connect-nowww

On Wednesday, October 10, 2012 8:22:32 AM UTC-6, Felix E. Klee wrote:
On Tue, Oct 9, 2012 at 10:12 PM, Isaac Schlueter <i...@izs.me> wrote:
> You can also use canonical-host for this: [...]

Thanks! It's good to know the options.
------=_Part_1365_18789411.1349892835272-- ------=_Part_1364_5716970.1349892835272--